From 80fafc659305211ca2dee2cebb9bd61b5684d2fe Mon Sep 17 00:00:00 2001 From: Maik Hoepfel Date: Sun, 9 Mar 2014 18:25:43 +0000 Subject: Display main template name as template panel's subtitle Frequently, that's the only information required from the templates panel. --- debug_toolbar/panels/templates/panel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debug_toolbar/panels/templates/panel.py b/debug_toolbar/panels/templates/panel.py index 74f28b0..4ee7772 100644 --- a/debug_toolbar/panels/templates/panel.py +++ b/debug_toolbar/panels/templates/panel.py @@ -145,6 +145,12 @@ class TemplatesPanel(Panel): num_templates = len(self.templates) return _("Templates (%(num_templates)s rendered)") % {'num_templates': num_templates} + @property + def nav_subtitle(self): + if self.templates: + return self.templates[0]['template'].name + return '' + template = 'debug_toolbar/panels/templates.html' @classmethod -- cgit v1.2.3