From c1717e5d74135585dcac4418a13f0248f560d32a Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 17 Oct 2016 11:31:35 +0200 Subject: [PATCH] Cache templates --- app/settings.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/settings.py b/app/settings.py index b3402f5b..f5bed651 100644 --- a/app/settings.py +++ b/app/settings.py @@ -258,7 +258,7 @@ MIGRATION_MODULES = { } -TEMPLATES = [{'APP_DIRS': True, +TEMPLATES = [{'APP_DIRS': False, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ('/srv/app/templates',), 'OPTIONS': {'builtins': ['mezzanine.template.loader_tags'], @@ -271,7 +271,14 @@ TEMPLATES = [{'APP_DIRS': True, 'django.core.context_processors.request', 'django.core.context_processors.tz', 'mezzanine.conf.context_processors.settings', - 'mezzanine.pages.context_processors.page')}}] + 'mezzanine.pages.context_processors.page'), + 'loaders': [ + ('django.template.loaders.cached.Loader', [ + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ]),], + }, + }] # List of middleware classes to use. Order is important; in the request phase, # these middleware classes will be applied in the order given, and in the -- 2.39.5