mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 08:14:13 +03:00
user new django 1.8 template configurations [skip ci]
This commit is contained in:
parent
894b72646a
commit
10156ad087
|
@ -73,9 +73,6 @@ MIGRATION_MODULES = {
|
|||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||
DEBUG = env.bool("DJANGO_DEBUG", False)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
# FIXTURE CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-FIXTURE_DIRS
|
||||
|
@ -132,30 +129,43 @@ USE_TZ = True
|
|||
|
||||
# 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 processors go here
|
||||
)
|
||||
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
TEMPLATE_DIRS = (
|
||||
str(APPS_DIR.path('templates')),
|
||||
)
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#templates
|
||||
TEMPLATES = [
|
||||
{
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATES-BACKEND
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
'DIRS': [
|
||||
str(APPS_DIR.path('templates')),
|
||||
],
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#app-dirs
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug
|
||||
'debug': DEBUG,
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-loaders
|
||||
# https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types
|
||||
'loaders': [
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
],
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'allauth.account.context_processors.account',
|
||||
'allauth.socialaccount.context_processors.socialaccount',
|
||||
'django.template.context_processors.i18n',
|
||||
'django.template.context_processors.media',
|
||||
'django.template.context_processors.static',
|
||||
'django.template.context_processors.tz',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
# Your stuff: custom template context processors go here
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
# See: http://django-crispy-forms.readthedocs.org/en/latest/install.html#template-packs
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
||||
|
|
|
@ -13,7 +13,7 @@ from .common import * # noqa
|
|||
# DEBUG
|
||||
# ------------------------------------------------------------------------------
|
||||
DEBUG = env.bool('DJANGO_DEBUG', default=True)
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
||||
|
||||
# SECRET CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -112,13 +112,13 @@ SERVER_EMAIL = EMAIL_HOST_USER
|
|||
|
||||
# TEMPLATE CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs
|
||||
TEMPLATE_LOADERS = (
|
||||
('django.template.loaders.cached.Loader', (
|
||||
# See: https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.cached.Loader
|
||||
TEMPLATES[0]['OPTIONS']['loaders'] = [
|
||||
('django.template.loaders.cached.Loader', [
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)),
|
||||
)
|
||||
]),
|
||||
]
|
||||
|
||||
# DATABASE CONFIGURATION
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -22,7 +22,7 @@ Pillow==2.8.1
|
|||
|
||||
# For user registration, either via email or social
|
||||
# Well-built with regular release cycles!
|
||||
django-allauth==0.19.1
|
||||
django-allauth==0.20.0
|
||||
|
||||
# For the persistence stores
|
||||
psycopg2==2.6
|
||||
|
|
Loading…
Reference in New Issue
Block a user