X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/08948f69c835e27c0f90dea93d71901a5a62b0f5..49d564d448e70875b1e89875e31a34af2e49e4ba:/forum/modules/template_loader.py diff --git a/forum/modules/template_loader.py b/forum/modules/template_loader.py index 61cb44e..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.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)