From e11bfdac25d48019377f64131b78f4462e9d005f Mon Sep 17 00:00:00 2001 From: Idan Gazit Date: Wed, 12 Aug 2009 15:18:47 +0300 Subject: oops, retitled templates panel --- debug_toolbar/panels/template.py | 3 +-- debug_toolbar/templates/debug_toolbar/panels/templates.html | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py index 6eb826f..8c6a972 100644 --- a/debug_toolbar/panels/template.py +++ b/debug_toolbar/panels/template.py @@ -7,7 +7,6 @@ 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.defaultfilters import pluralize from debug_toolbar.panels import DebugPanel # Code taken and adapted from Simon Willison and Django Snippets: @@ -46,7 +45,7 @@ class TemplateDebugPanel(DebugPanel): return 'Templates' def title(self): - return 'Template path%s:' % pluralize(len(self.templates)) + return 'Templates' def url(self): return '' diff --git a/debug_toolbar/templates/debug_toolbar/panels/templates.html b/debug_toolbar/templates/debug_toolbar/panels/templates.html index 78519c9..01240f7 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/templates.html +++ b/debug_toolbar/templates/debug_toolbar/panels/templates.html @@ -1,3 +1,4 @@ +

Template path{{ template_dirs|length|pluralize }}

{% if template_dirs %}
    {% for template in template_dirs %} @@ -7,7 +8,7 @@ {% else %}

    None

    {% endif %} -

    Template{{ templates|length|pluralize }}

    +

    Template{{ templates|length|pluralize }}

    {% if templates %}
    {% for template in templates %} @@ -22,7 +23,7 @@ {% else %}

    None

    {% endif %} -

    Context processor{{ context_processors|length|pluralize }}

    +

    Context processor{{ context_processors|length|pluralize }}

    {% if context_processors %}
    {% for key, value in context_processors.iteritems %} -- cgit v1.2.3