diff options
| author | Chris Adams | 2010-01-14 08:02:49 -0800 |
|---|---|---|
| committer | Rob Hudson | 2010-01-14 08:02:49 -0800 |
| commit | 4baa51e0be674428a2314e08efe43628184bc42a (patch) | |
| tree | d3584431a61ad1fbdf885e024950f472b89ff21e /debug_toolbar/panels/logger.py | |
| parent | fba93b813f90430545d5acaa25ef218f792360ab (diff) | |
| download | django-debug-toolbar-4baa51e0be674428a2314e08efe43628184bc42a.tar.bz2 | |
Template panel context cleanup.
All panels get a copy of the template context when created and use an updated
copy when rendering so they can have full access to context vars and avoid
making changes to the shared context.
Signed-off-by: Rob Hudson <rob@cogit8.org>
Diffstat (limited to 'debug_toolbar/panels/logger.py')
| -rw-r--r-- | debug_toolbar/panels/logger.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/debug_toolbar/panels/logger.py b/debug_toolbar/panels/logger.py index 99f2602..620102e 100644 --- a/debug_toolbar/panels/logger.py +++ b/debug_toolbar/panels/logger.py @@ -75,4 +75,9 @@ class LoggingPanel(DebugPanel): 'file': record.pathname, 'line': record.lineno, }) - return render_to_string('debug_toolbar/panels/logger.html', {'records': records}) + + context = self.context.copy() + context.update({'records': records}) + + return render_to_string('debug_toolbar/panels/logger.html', context) + |
