File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,13 @@ 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
+
57
+ # django.template.backends.django gets loaded lazily, so return false
58
+ # until they've been loaded
59
+ if not hasattr (django .template , "backends" ):
60
+ return False
56
61
if not hasattr (django .template .backends , "django" ):
57
- raise DjangoTemplatePluginException ( "Can't use non-Django templates." )
62
+ return False
58
63
59
64
if not hasattr (django .template .backends .django , "DjangoTemplates" ):
60
65
raise DjangoTemplatePluginException ("Can't use non-Django templates." )
You can’t perform that action at this time.
0 commit comments