diff options
| author | Chris Beaven | 2009-09-29 12:10:49 +1300 |
|---|---|---|
| committer | Rob Hudson | 2009-09-30 07:08:16 -0700 |
| commit | 1b685252146aec3345adb7d2dec6d9f3173db678 (patch) | |
| tree | 0895c97748d183829836cd33c5425f6791985207 | |
| parent | 1ca31fe54936d29f15cf23d92b9ab331e5199707 (diff) | |
| download | django-debug-toolbar-1b685252146aec3345adb7d2dec6d9f3173db678.tar.bz2 | |
Template panel: One letter variable names are bad practice, changed to use some more informative variable names.
Signed-off-by: Rob Hudson <rob@cogit8.org>
| -rw-r--r-- | debug_toolbar/panels/template.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/debug_toolbar/panels/template.py b/debug_toolbar/panels/template.py index cc3b1e1..642cd3c 100644 --- a/debug_toolbar/panels/template.py +++ b/debug_toolbar/panels/template.py @@ -65,24 +65,24 @@ class TemplateDebugPanel(DebugPanel): ] ) template_context = [] - for i, d in enumerate(self.templates): + for template_data in self.templates: info = {} # Clean up some info about templates - t = d.get('template', None) + template = template_data.get('template', None) # Skip templates that we are generating through the debug toolbar. - if t.name.startswith('debug_toolbar/'): + if template.name.startswith('debug_toolbar/'): continue - if t.origin and t.origin.name: - t.origin_name = t.origin.name + if template.origin and template.origin.name: + template.origin_name = template.origin.name else: - t.origin_name = 'No origin' - info['template'] = t + template.origin_name = 'No origin' + info['template'] = template # Clean up context for better readability if getattr(settings, 'DEBUG_TOOLBAR_CONFIG', {}).get('SHOW_TEMPLATE_CONTEXT', True): - c = d.get('context', None) + context_data = template_data.get('context', None) context_list = [] - for context_layer in c.dicts: + for context_layer in context_data.dicts: for key, value in context_layer.items(): # Replace any request elements - they have a large # unicode representation. The request data is already |
