diff options
| author | Maik Hoepfel | 2014-03-09 18:25:43 +0000 | 
|---|---|---|
| committer | Maik Hoepfel | 2014-03-09 18:25:43 +0000 | 
| commit | 80fafc659305211ca2dee2cebb9bd61b5684d2fe (patch) | |
| tree | e78aece0fea71730f11473edbd25e92ff971344f | |
| parent | a1eaf63dcc6de031a2c8c7dae88de883618aa557 (diff) | |
| download | django-debug-toolbar-80fafc659305211ca2dee2cebb9bd61b5684d2fe.tar.bz2 | |
Display main template name as template panel's subtitle
Frequently, that's the only information required from the templates
panel.
| -rw-r--r-- | debug_toolbar/panels/templates/panel.py | 6 | 
1 files changed, 6 insertions, 0 deletions
| 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 | 
