summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2018-03-25 14:56:21 +0000
committerMagnus Hagander2018-03-25 14:56:21 +0000
commit7c131bc5755c0f52a99ac47c7f6d79aecbca679b (patch)
tree9fbf6542548749db94544c2e54f696a688452dae
parentd7fd3f690568c0e00fec5060329d9732466eefdf (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--pgmailmgr/settings.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pgmailmgr/settings.py b/pgmailmgr/settings.py
index 006cd54..12d67bc 100644
--- a/pgmailmgr/settings.py
+++ b/pgmailmgr/settings.py
@@ -101,13 +101,16 @@ ROOT_URLCONF = 'pgmailmgr.urls'
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- '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',
+ ],
},
}]