modify template_loaders before we actually set them

This commit is contained in:
Laura Klünder 2017-12-15 00:17:31 +01:00
parent 6e952a2928
commit 24a62bc36a

View file

@ -263,6 +263,10 @@ template_loaders = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
if not DEBUG:
template_loaders = (
('django.template.loaders.cached.Loader', template_loaders),
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
@ -281,10 +285,6 @@ TEMPLATES = [
},
},
]
if not DEBUG:
template_loaders = (
('django.template.loaders.cached.Loader', template_loaders),
)
STATICFILES_FINDERS = (