Esempio 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 []
Esempio 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 []