Commit 15b711b5 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

Deprecated TEMPLATE_DEBUG setting.

parent 9fbd302f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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 = []


+1 −1
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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:
+1 −0
Original line number Diff line number Diff line
@@ -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,
                    },
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ def reset_template_engines(**kwargs):
        'TEMPLATE_DEBUG',
        'TEMPLATE_LOADERS',
        'TEMPLATE_STRING_IF_INVALID',
        'DEBUG',
        'FILE_CHARSET',
        'INSTALLED_APPS',
    }:
Loading