amue/settings.py: use cached template loader if DEBUG is False
This commit is contained in:
parent
e9dbe25407
commit
f03454a439
|
@ -57,10 +57,17 @@ if 'STATICFILES_DIRS' in os.environ:
|
|||
else:
|
||||
STATICFILES_DIRS = ('/var/lib/%s/extra-static/' % PROJECT_NAME,)
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
if DEBUG:
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
else:
|
||||
TEMPLATE_LOADERS = (
|
||||
('django.template.loaders.cached.Loader', (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',)),
|
||||
)
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
|
|
Reference in New Issue