From 5a4ad2059736bd11a5e2ff67aa8620f45c77d0eb Mon Sep 17 00:00:00 2001 From: Maximilian Stauss Date: Tue, 15 Sep 2015 16:04:36 -0400 Subject: [PATCH 1/2] updated settings so that there is no decrepation warning TEMPLATE_DEBUG is now an Option of every template referenced in https://docs.djangoproject.com/en/1.8/ref/settings/#template-debug --- wagtail/project_template/project_name/settings/dev.py | 5 ++++- wagtail/project_template/project_name/settings/production.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wagtail/project_template/project_name/settings/dev.py b/wagtail/project_template/project_name/settings/dev.py index ccf551c499..d408322203 100644 --- a/wagtail/project_template/project_name/settings/dev.py +++ b/wagtail/project_template/project_name/settings/dev.py @@ -3,7 +3,10 @@ from .base import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = True +DEBUG_TEMPLATE = True + +for i in range(0, len(TEMPLATES) - 1): + TEMPLATES[i]['OPTIONS']['debug'] = DEBUG_TEMPLATE # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '{{ secret_key }}' diff --git a/wagtail/project_template/project_name/settings/production.py b/wagtail/project_template/project_name/settings/production.py index bea6d7eb81..3b102b9ad4 100644 --- a/wagtail/project_template/project_name/settings/production.py +++ b/wagtail/project_template/project_name/settings/production.py @@ -2,7 +2,10 @@ from .base import * DEBUG = False -TEMPLATE_DEBUG = False +DEBUG_TEMPLATE = False + +for i in range(0, len(TEMPLATES) - 1): + TEMPLATES[i]['OPTIONS']['debug'] = DEBUG_TEMPLATE try: From 9ff7961a3c8f508ad17735cd815335bad12fd67f Mon Sep 17 00:00:00 2001 From: Maximilian Stauss Date: Wed, 16 Sep 2015 12:26:19 -0400 Subject: [PATCH 2/2] updated/cleaned settings after suggestions --- wagtail/project_template/project_name/settings/dev.py | 5 ++--- wagtail/project_template/project_name/settings/production.py | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wagtail/project_template/project_name/settings/dev.py b/wagtail/project_template/project_name/settings/dev.py index d408322203..823c6fb2d3 100644 --- a/wagtail/project_template/project_name/settings/dev.py +++ b/wagtail/project_template/project_name/settings/dev.py @@ -3,10 +3,9 @@ from .base import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -DEBUG_TEMPLATE = True -for i in range(0, len(TEMPLATES) - 1): - TEMPLATES[i]['OPTIONS']['debug'] = DEBUG_TEMPLATE +for template_engine in TEMPLATES: + template_engine['OPTIONS']['debug'] = True # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '{{ secret_key }}' diff --git a/wagtail/project_template/project_name/settings/production.py b/wagtail/project_template/project_name/settings/production.py index 3b102b9ad4..4d403fb14d 100644 --- a/wagtail/project_template/project_name/settings/production.py +++ b/wagtail/project_template/project_name/settings/production.py @@ -2,11 +2,6 @@ from .base import * DEBUG = False -DEBUG_TEMPLATE = False - -for i in range(0, len(TEMPLATES) - 1): - TEMPLATES[i]['OPTIONS']['debug'] = DEBUG_TEMPLATE - try: from .local import *