summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2018-03-25 14:53:46 +0000
committerMagnus Hagander2018-03-25 14:53:46 +0000
commitddf65816afb2e17f51d9279f2a4b6d7787aa0301 (patch)
treeda2cf2a05fbcf7bf4c9e64ed605013e11fc7b460
parent795951280cf861dee252e7a1920aadf7009eb378 (diff)
Fix template loaders for django 1.11
Seems django 1.11 automatically enables caching template loader, which of course breaks the ability to make any changes to the pages of a website without restarting it. And there is no way to turn it off other than to explicitly configure individual loders (the logic to turn it on in non-debug configurations is hardcoded and cannot be changed).
-rw-r--r--pgcommitfest/settings.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pgcommitfest/settings.py b/pgcommitfest/settings.py
index 111d118..1c1a860 100644
--- a/pgcommitfest/settings.py
+++ b/pgcommitfest/settings.py
@@ -100,13 +100,16 @@ ROOT_URLCONF = 'pgcommitfest.urls'
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['global_templates'],
- 'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
+ 'loaders': [
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ ],
},
}]