From ddf65816afb2e17f51d9279f2a4b6d7787aa0301 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 25 Mar 2018 16:53:46 +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). --- pgcommitfest/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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', + ], }, }] -- 2.39.5