aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Araujo Perez2011-06-10 11:31:01 +0200
committerMiguel Araujo Perez2011-06-10 11:31:01 +0200
commitd505f4975602d79c8d0650068569c524459dc5db (patch)
tree57886226b287c17f7194c2e0f72d07fb1001dd14
parentab01a82b42a1e3641a79d4d14e8c96b03ba47298 (diff)
downloaddjango-debug-toolbar-d505f4975602d79c8d0650068569c524459dc5db.tar.bz2
Checking if the origin attribute exists on the Template object instead
-rw-r--r--debug_toolbar/panels/template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py
index 1d543f9..3c70690 100644
--- a/debug_toolbar/panels/template.py
+++ b/debug_toolbar/panels/template.py
@@ -78,7 +78,7 @@ class TemplateDebugPanel(DebugPanel):
# Skip templates that we are generating through the debug toolbar.
if template.name and template.name.startswith('debug_toolbar/'):
continue
- if template.name == "<Unknown Template>":
+ if not hasattr(template, 'origin'):
continue
if template.origin and template.origin.name:
template.origin_name = template.origin.name