diff options
| author | Alex Gaynor | 2009-08-11 13:33:03 -0500 |
|---|---|---|
| committer | Alex Gaynor | 2009-08-11 13:33:03 -0500 |
| commit | 89a0b38316e1822bf22a4f013a6bb12f9db585b8 (patch) | |
| tree | e869b25e9ca66c29a8c75179e7a1ed4e75a8cabf /debug_toolbar/templates | |
| parent | 90681f01b4ba3261fb1a44559dc0ada539249719 (diff) | |
| download | django-debug-toolbar-89a0b38316e1822bf22a4f013a6bb12f9db585b8.tar.bz2 | |
allow for handling the pathological case of an insanely large template context
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/templates.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 6c918b1..e54c951 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -14,10 +14,12 @@ {% for template in templates %} <dt><strong><a class="remoteCall" href="/__debug__/template_source/?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt> <dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd> - <dd> - <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ template.context }}</pre></div> - </dd> + {% if template.context %} + <dd> + <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> + <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ template.context }}</pre></div> + </dd> + {% endif %} {% endfor %} </dl> {% else %} |
