misc: update to use new TEMPLATES settings (#15971)

This commit is contained in:
Frédéric Péters 2017-04-24 14:00:24 +02:00
parent faa85ba3bd
commit 74984105b4
2 changed files with 22 additions and 9 deletions

View File

@ -24,7 +24,7 @@ and to disable DEBUG mode in production.
"""
import os
from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS, STATICFILES_FINDERS
from django.conf.global_settings import STATICFILES_FINDERS
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
@ -38,11 +38,8 @@ SECRET_KEY = '1am-@xw1d%#+1f+4$ws4e3*k9+z&f4f9i#di4pt4@_%829(%bl'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATE_DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = (
@ -68,10 +65,6 @@ MIDDLEWARE_CLASSES = (
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
TEMPLATE_CONTEXT_PROCESSORS += (
'django.core.context_processors.request',
)
# Serve xstatic files, required for gadjo
STATICFILES_FINDERS = tuple(STATICFILES_FINDERS) + ('gadjo.finders.XStaticFinder',)
@ -107,6 +100,27 @@ LOCALE_PATHS = (os.path.join(BASE_DIR, 'chrono', 'locale'), )
FORMAT_MODULE_PATH = 'chrono.formats'
# Templates
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'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',
],
},
},
]
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

1
debian/settings.py vendored
View File

@ -13,7 +13,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
#ADMINS = (
# # ('User 1', 'watchdog@example.net'),