diff options
| -rw-r--r-- | debug_toolbar/panels/template.py | 2 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/templates.html | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py index 9cab618..022a41f 100644 --- a/debug_toolbar/panels/template.py +++ b/debug_toolbar/panels/template.py @@ -2,9 +2,9 @@ from pprint import pformat from django.conf import settings from django.core.signals import request_started from django.dispatch import Signal +from django.template.context import get_standard_processors from django.template.loader import render_to_string from django.test.signals import template_rendered -from django.template.context import get_standard_processors from debug_toolbar.panels import DebugPanel # Code taken and adapted from Simon Willison and Django Snippets: diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index e878be2..fa6bb5e 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,4 +1,4 @@ -<h3>Template path(s):</h3> +<h3>Template path{{ template_dirs|pluralize }}</h3> {% if template_dirs %} <ol> {% for template in template_dirs %} @@ -8,7 +8,7 @@ {% else %} None {% endif %} -<h3>Templates Used</h3> +<h3>Template{{ templates|pluralize }}</h3> {% if templates %} <dl> {% for template in templates %} @@ -23,15 +23,15 @@ {% else %} None {% endif %} +<h3>Context processor{{ context_processors|pluralize }}</h3> {% if context_processors %} -<h3>Context processors used:</h3> <dl> {% for key, value in context_processors.iteritems %} - <dt><strong>{{ key|escape }}</strong></dt> - <dd> - <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> - <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div> - </dd> + <dt><strong>{{ key|escape }}</strong></dt> + <dd> + <div class="djTemplateShowContextDiv"><a class="djTemplateShowContext">Toggle Context</a></div> + <div class="djTemplateHideContextDiv" style="display:none;"><pre>{{ value|escape }}</pre></div> + </dd> {% endfor %} </dl> {% else %} |
