summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-02-15 15:42:05 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-02-15 20:47:04 +0100
commit15b711b5ee9ce1ddd01cf88b2bbbec4a6cbec648 (patch)
tree64966e17bf88b41b0f93f04c15ff2e4a76e071be /django
parent9fbd302f91162434f375b67a533d4a955a439484 (diff)
Deprecated TEMPLATE_DEBUG setting.
Diffstat (limited to 'django')
-rw-r--r--django/conf/project_template/project_name/settings.py2
-rw-r--r--django/template/backends/django.py2
-rw-r--r--django/template/defaulttags.py4
-rw-r--r--django/template/utils.py1
-rw-r--r--django/test/signals.py1
5 files changed, 5 insertions, 5 deletions
diff --git a/django/conf/project_template/project_name/settings.py b/django/conf/project_template/project_name/settings.py
index c0db27cbdc..3eaf05cfc0 100644
--- a/django/conf/project_template/project_name/settings.py
+++ b/django/conf/project_template/project_name/settings.py
@@ -25,8 +25,6 @@ SECRET_KEY = '{{ secret_key }}'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
-TEMPLATE_DEBUG = True
-
ALLOWED_HOSTS = []
diff --git a/django/template/backends/django.py b/django/template/backends/django.py
index 65c65bdeee..5940c0b457 100644
--- a/django/template/backends/django.py
+++ b/django/template/backends/django.py
@@ -18,7 +18,7 @@ class DjangoTemplates(BaseEngine):
def __init__(self, params):
params = params.copy()
options = params.pop('OPTIONS').copy()
- options.setdefault('debug', settings.TEMPLATE_DEBUG)
+ options.setdefault('debug', settings.DEBUG)
options.setdefault('file_charset', settings.FILE_CHARSET)
super(DjangoTemplates, self).__init__(params)
self.engine = Engine(self.dirs, self.app_dirs, **options)
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index a75248332c..da68ec6a66 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -209,8 +209,8 @@ class ForNode(Node):
context.update(unpacked_vars)
else:
context[self.loopvars[0]] = item
- # In TEMPLATE_DEBUG mode provide source of the node which
- # actually raised the exception
+ # In debug mode provide the source of the node which raised
+ # the exception
if context.engine.debug:
for node in self.nodelist_loop:
try:
diff --git a/django/template/utils.py b/django/template/utils.py
index f9b322fea9..8bfa9d4f0e 100644
--- a/django/template/utils.py
+++ b/django/template/utils.py
@@ -42,6 +42,7 @@ class EngineHandler(object):
'OPTIONS': {
'allowed_include_roots': settings.ALLOWED_INCLUDE_ROOTS,
'context_processors': settings.TEMPLATE_CONTEXT_PROCESSORS,
+ 'debug': settings.TEMPLATE_DEBUG,
'loaders': settings.TEMPLATE_LOADERS,
'string_if_invalid': settings.TEMPLATE_STRING_IF_INVALID,
},
diff --git a/django/test/signals.py b/django/test/signals.py
index d2bb209dbf..0c2bf5201c 100644
--- a/django/test/signals.py
+++ b/django/test/signals.py
@@ -93,6 +93,7 @@ def reset_template_engines(**kwargs):
'TEMPLATE_DEBUG',
'TEMPLATE_LOADERS',
'TEMPLATE_STRING_IF_INVALID',
+ 'DEBUG',
'FILE_CHARSET',
'INSTALLED_APPS',
}: