mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Template caching
This commit is contained in:
parent
109f4c9b68
commit
b3a43bc633
|
@ -128,36 +128,6 @@ STATICFILES_FINDERS = (
|
|||
########## END STATIC FILE CONFIGURATION
|
||||
|
||||
|
||||
########## TEMPLATE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
"allauth.account.context_processors.account",
|
||||
"allauth.socialaccount.context_processors.socialaccount",
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.static',
|
||||
'django.core.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.core.context_processors.request',
|
||||
# Your stuff: custom template context processers go here
|
||||
)
|
||||
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
TEMPLATE_DIRS = (
|
||||
join(BASE_DIR, 'templates'),
|
||||
)
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
('django.template.loaders.cached.Loader', (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)),
|
||||
)
|
||||
########## END TEMPLATE CONFIGURATION
|
||||
|
||||
########## APP CONFIGURATION
|
||||
DJANGO_APPS = (
|
||||
# Default Django apps:
|
||||
|
@ -317,6 +287,42 @@ else:
|
|||
SERVER_EMAIL = EMAIL_HOST_USER
|
||||
########## END EMAIL
|
||||
|
||||
########## TEMPLATE CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
"allauth.account.context_processors.account",
|
||||
"allauth.socialaccount.context_processors.socialaccount",
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.static',
|
||||
'django.core.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.core.context_processors.request',
|
||||
# Your stuff: custom template context processers go here
|
||||
)
|
||||
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
TEMPLATE_DIRS = (
|
||||
join(BASE_DIR, 'templates'),
|
||||
)
|
||||
|
||||
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',
|
||||
)),
|
||||
)
|
||||
########## END TEMPLATE CONFIGURATION
|
||||
|
||||
|
||||
########## LOGGING CONFIGURATION
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#logging
|
||||
|
|
Loading…
Reference in New Issue
Block a user