diff options
| author | Aymeric Augustin | 2013-11-29 22:22:38 +0100 |
|---|---|---|
| committer | Aymeric Augustin | 2013-11-29 22:24:09 +0100 |
| commit | c33ce081f270b43fffe8af33bf50ae821aa12fcf (patch) | |
| tree | 4057ccbd22201dd977cd3b1c945aabe27728d454 /debug_toolbar/panels/timer.py | |
| parent | c12de857b96960bdb506d084b186b62e0c4bd292 (diff) | |
| download | django-debug-toolbar-c33ce081f270b43fffe8af33bf50ae821aa12fcf.tar.bz2 | |
Stop sharing unsafely a context dict across threads.
Panels that need to share data with other panels shall do it through the
record_stats / get_stats API. Statistics are automatically pushed to the
template context.
Fix #450.
Diffstat (limited to 'debug_toolbar/panels/timer.py')
| -rw-r--r-- | debug_toolbar/panels/timer.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/debug_toolbar/panels/timer.py b/debug_toolbar/panels/timer.py index 6df4d4d..6b36bf9 100644 --- a/debug_toolbar/panels/timer.py +++ b/debug_toolbar/panels/timer.py @@ -45,9 +45,7 @@ class TimerPanel(Panel): (_('Elapsed time'), _('%(total_time)0.3f msec') % stats), (_('Context switches'), _('%(vcsw)d voluntary, %(ivcsw)d involuntary') % stats), ) - context = self.context.copy() - context.update({'rows': rows}) - return render_to_string(self.template, context) + return render_to_string(self.template, {'rows': rows}) def process_request(self, request): self._start_time = time.time() |
