Exemplo n.º 1
0
def get_xpack_templates_dir():
    if XPACK_ENABLED:
        dirs = []
        from xpack.utils import find_enabled_plugins
        for i in find_enabled_plugins():
            template_dir = os.path.join(BASE_DIR, 'xpack', 'plugins', i, 'templates')
            if os.path.isdir(template_dir):
                dirs.append(template_dir)
        return dirs
    else:
        return []
Exemplo n.º 2
0
def get_xpack_templates_dir():
    if XPACK_ENABLED:
        dirs = []
        from xpack.utils import find_enabled_plugins
        for i in find_enabled_plugins():
            template_dir = os.path.join(BASE_DIR, 'xpack', 'plugins', i, 'templates')
            if os.path.isdir(template_dir):
                dirs.append(template_dir)
        return dirs
    else:
        return []