Cache templates loading

remotes/origin/1203
Kotiuk Nazarii 11 years ago
parent 66ddabc419
commit df6f2641cc
  1. 20
      proj/settings.py

@ -115,12 +115,6 @@ STATICFILES_FINDERS = (
SECRET_KEY = '=yz1@ko%1s8bmel)c84#s*xpxn%4(1e+smdnh*@rdm*5%v!mln'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
@ -416,6 +410,20 @@ except ImportError, e:
pass
if not DEBUG:
# cache template loading
TEMPLATE_LOADERS = (
('django.template.loaders.cached.Loader', (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)),
)
else:
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
# debug_toolbar settings
"""
if DEBUG:

Loading…
Cancel
Save