File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,16 @@ def check_debug():
53
53
# Django 1.8+ handles both old and new-style settings and converts them
54
54
# into template engines, so we don't need to depend on settings values
55
55
# directly and can look at the resulting configured objects
56
+ if not hasattr (django .template .backends , "django" ):
57
+ raise DjangoTemplatePluginException ("Can't use non-Django templates." )
58
+
59
+ if not hasattr (django .template .backends .django , "DjangoTemplates" ):
60
+ raise DjangoTemplatePluginException ("Can't use non-Django templates." )
61
+
56
62
for engine in django .template .engines .all ():
57
63
if not isinstance (engine , django .template .backends .django .DjangoTemplates ):
58
64
raise DjangoTemplatePluginException (
59
- "Can't use non-Django templates. Found '%s': %s" %
60
- (engine .name , engine )
65
+ "Can't use non-Django templates."
61
66
)
62
67
if not engine .engine .debug :
63
68
raise DjangoTemplatePluginException (
You can’t perform that action at this time.
0 commit comments