[damned-lies] Let default Django template loaders



commit e64ed5e7fd14c21b8758257e11c2b5bdcbd269fd
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Apr 24 14:36:17 2021 +0200

    Let default Django template loaders
    
    In recent Django, the cached loader is automatically chosen when DEBUG is False.

 damnedlies/settings.py | 13 -------------
 1 file changed, 13 deletions(-)
---
diff --git a/damnedlies/settings.py b/damnedlies/settings.py
index e6aeb0a6..098f895d 100644
--- a/damnedlies/settings.py
+++ b/damnedlies/settings.py
@@ -105,12 +105,6 @@ TEMPLATES = [
                 'django.template.context_processors.request',
                 'common.context_processors.utils',
             ],
-            'loaders': [
-                ('django.template.loaders.cached.Loader', [
-                    'django.template.loaders.filesystem.Loader',
-                    'django.template.loaders.app_directories.Loader',
-                ]),
-            ],
             'builtins': [
                 'django.templatetags.i18n',
                 'django.templatetags.static',
@@ -194,13 +188,6 @@ try:
 except ImportError:
     pass
 
-# Allowing local_settings to override template loaders (not cached on dev)
-try:
-    TEMPLATES[0]['OPTIONS']['loaders'] = TEMPLATE_LOADERS
-    del TEMPLATE_LOADERS
-except NameError:
-    pass
-
 # When running in development mode, print emails on stdout instead of trying
 # to send them
 if DEBUG:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]