From c11e39415b9c87636d608dcd567a1a5b46068896 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 25 Mar 2018 16:51:48 +0200 Subject: [PATCH] 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). --- pgweb/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pgweb/settings.py b/pgweb/settings.py index cb53eb50..faeefc18 100644 --- a/pgweb/settings.py +++ b/pgweb/settings.py @@ -65,7 +65,6 @@ ROOT_URLCONF = 'pgweb.urls' TEMPLATES = [{ 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['templates', ], - 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.contrib.auth.context_processors.auth', @@ -73,6 +72,10 @@ TEMPLATES = [{ 'django.template.context_processors.media', 'pgweb.util.contexts.PGWebContextProcessor', ], + 'loaders': [ + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ], }, }] -- 2.39.5