aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/panels/cache.py')
-rw-r--r--debug_toolbar/panels/cache.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/debug_toolbar/panels/cache.py b/debug_toolbar/panels/cache.py
index 61b5690..5617ec2 100644
--- a/debug_toolbar/panels/cache.py
+++ b/debug_toolbar/panels/cache.py
@@ -76,7 +76,8 @@ class CacheDebugPanel(DebugPanel):
name = 'Cache'
has_content = True
- def __init__(self):
+ def __init__(self, *args, **kwargs):
+ super(self.__class__, self).__init__(*args, **kwargs)
# This is hackish but to prevent threading issues is somewhat needed
if isinstance(cache.cache, CacheStatTracker):
cache.cache.reset()
@@ -95,9 +96,10 @@ class CacheDebugPanel(DebugPanel):
return ''
def content(self):
- context = dict(
- cache_calls = len(self.cache.calls),
- cache_time = self.cache.total_time,
- cache = self.cache,
- )
+ context = self.context.copy()
+ context.update({
+ 'cache_calls': len(self.cache.calls),
+ 'cache_time': self.cache.total_time,
+ 'cache': self.cache,
+ })
return render_to_string('debug_toolbar/panels/cache.html', context)