aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug_toolbar/panels/template.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py
index 44b8b3e..3c70690 100644
--- a/debug_toolbar/panels/template.py
+++ b/debug_toolbar/panels/template.py
@@ -78,6 +78,8 @@ class TemplateDebugPanel(DebugPanel):
# Skip templates that we are generating through the debug toolbar.
if template.name and template.name.startswith('debug_toolbar/'):
continue
+ if not hasattr(template, 'origin'):
+ continue
if template.origin and template.origin.name:
template.origin_name = template.origin.name
else: