From 93f267939f14383f1284277fe4ab61cbc8c2857b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 28 Dec 2017 09:52:57 +0100 Subject: [PATCH] misc: update settings for django 1.11 (#20909) --- welco/settings.py | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/welco/settings.py b/welco/settings.py index 88ea273..60cda87 100644 --- a/welco/settings.py +++ b/welco/settings.py @@ -27,8 +27,6 @@ SECRET_KEY = '6_7axt+6zknzt_==uj#5lvy!59#+wpvts9qbwie2ci1@hz6&23' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = True - ALLOWED_HOSTS = [] @@ -101,7 +99,7 @@ LOCALE_PATHS = (os.path.join(BASE_DIR, 'welco', 'locale'), ) STATIC_URL = '/static/' -STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',) +STATICFILES_FINDERS = tuple(global_settings.STATICFILES_FINDERS) + ('gadjo.finders.XStaticFinder',) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'welco', 'static'), @@ -110,9 +108,26 @@ STATICFILES_DIRS = ( MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' -TEMPLATE_DIRS = ( - os.path.join(BASE_DIR, 'welco', 'templates'), -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(BASE_DIR, 'welco', 'templates'), + ], + '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', + ], + }, + }, +] CKEDITOR_UPLOAD_PATH = 'uploads/'