From: Magnus Hagander Date: Sun, 25 Mar 2018 14:54:59 +0000 (+0200) Subject: Fix template loaders for django 1.11 X-Git-Url: http://git.postgresql.org/gitweb/edit?a=commitdiff_plain;h=6f5f698646f76fbdca083d2a8afe37794a9d6c51;p=pggit.git 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). --- 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', + ], }, }]