1313
1414import django
1515import django .template
16- from django .core .exceptions import ImproperlyConfigured
1716from django .template .base import (
1817 Lexer , TextNode , NodeList , Template ,
1918 TOKEN_BLOCK , TOKEN_MAPPING , TOKEN_TEXT , TOKEN_VAR ,
@@ -45,11 +44,6 @@ def check_debug():
4544
4645 Returns True if the debug check was performed, False otherwise
4746 """
48- # The settings for templates changed in Django 1.8 from TEMPLATE_DEBUG to
49- # TEMPLATES[..]['debug']. Django 1.9 tolerated both forms, 1.10 insists on
50- # the new form. Don't try to be version-specific here. If the new
51- # settings exist, use them, otherwise use the old.
52-
5347 from django .conf import settings
5448
5549 if not settings .configured :
@@ -58,7 +52,7 @@ def check_debug():
5852 if django .VERSION >= (1 , 8 ):
5953 # Django 1.8+ handles both old and new-style settings and converts them
6054 # into template engines, so we don't need to depend on settings values
61- # directly
55+ # directly and can look at the resulting configured objects
6256 for engine in django .template .engines .all ():
6357 if not isinstance (engine , django .template .backends .django .DjangoTemplates ):
6458 raise DjangoTemplatePluginException (
0 commit comments