From 6f5f698646f76fbdca083d2a8afe37794a9d6c51 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sun, 25 Mar 2018 16:54:59 +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). --- gitadmin/gitadmin/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitadmin/gitadmin/settings.py b/gitadmin/gitadmin/settings.py index 1e7d941..911fd66 100644 --- a/gitadmin/gitadmin/settings.py +++ b/gitadmin/gitadmin/settings.py @@ -62,13 +62,16 @@ ROOT_URLCONF = 'gitadmin.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', + ], }, }] -- 2.39.5