diff options
author | Magnus Hagander | 2018-03-25 14:56:21 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-03-25 14:56:21 +0000 |
commit | 7c131bc5755c0f52a99ac47c7f6d79aecbca679b (patch) | |
tree | 9fbf6542548749db94544c2e54f696a688452dae | |
parent | d7fd3f690568c0e00fec5060329d9732466eefdf (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.py | 5 |
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', + ], }, }] |