X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/6cea0592c2d7522b7e6501ebe52368618f92d58c..00c96a815b90c672ee5f023658783e127a4b1165:/forum/modules/template_loader.py?ds=inline diff --git a/forum/modules/template_loader.py b/forum/modules/template_loader.py index d0e57ac..510f308 100644 --- a/forum/modules/template_loader.py +++ b/forum/modules/template_loader.py @@ -1,7 +1,7 @@ import os, re from forum.skins import load_template_source as skins_template_loader, Template, BaseTemplateLoader -from forum import modules +from django.conf import settings MODULES_TEMPLATE_PREFIX = 'modules/' NO_OVERRIDE_TEMPLATE_PREFIX = 'no_override/' @@ -9,7 +9,7 @@ MODULES_TEMPLATE_FOLDER = 'templates' MODULES_TEMPLATE_OVERRIDES_FOLDER = 'template_overrides' TEMPLATE_OVERRIDE_LOOKUP_PATHS = [f for f in [ - os.path.join(os.path.dirname(m.__file__), MODULES_TEMPLATE_OVERRIDES_FOLDER) for m in modules.MODULE_LIST + os.path.join(os.path.dirname(m.__file__), MODULES_TEMPLATE_OVERRIDES_FOLDER) for m in settings.MODULE_LIST ] if os.path.exists(f) ] @@ -22,7 +22,7 @@ class ModulesTemplateLoader(BaseTemplateLoader): if name.startswith(MODULES_TEMPLATE_PREFIX): match = self.modules_re.search(name) - file_name = os.path.join(modules.get_modules_folder(), match.group(1), MODULES_TEMPLATE_FOLDER, match.group(2)) + file_name = os.path.join(settings.MODULES_FOLDER, match.group(1), MODULES_TEMPLATE_FOLDER, match.group(2)) if os.path.exists(file_name): template = Template(file_name)