def get_app_template_dir(app_name):
    """Get the template directory for an application

    Uses apps interface available in django 1.7+

    Returns a full path, or None if the app was not found.
    """
    if app_name in _cache:
        return _cache[app_name]
    template_dir = None
    for app in apps.get_app_configs():
        if app.label == app_name:
            template_dir = join(app.path, 'templates')
            break
    _cache[app_name] = template_dir
    return template_dir
Get the template directory for an application

    Uses apps interface available in django 1.7+

    Returns a full path, or None if the app was not found.