aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkonkle2011-09-12 11:25:35 -0500
committerbkonkle2011-09-12 11:25:35 -0500
commit74a7c2f3209b8561e71a140842877ee89fc6c725 (patch)
tree76aa0d18a542b16b7d0bfda3b9b2d3304e1696f9
parentb77aec6160d66ee1ecff2687d74724ce74ea8ff5 (diff)
downloaddjango-debug-toolbar-74a7c2f3209b8561e71a140842877ee89fc6c725.tar.bz2
Update the cache panel to use the toolbar object
-rw-r--r--debug_toolbar/panels/cache.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/debug_toolbar/panels/cache.py b/debug_toolbar/panels/cache.py
index 4cc783e..bbfed66 100644
--- a/debug_toolbar/panels/cache.py
+++ b/debug_toolbar/panels/cache.py
@@ -5,6 +5,7 @@ from django.core import cache
from django.core.cache.backends.base import BaseCache
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
+from debug_toolbar.middleware import DebugToolbarMiddleware
from debug_toolbar.panels import DebugPanel
class CacheStatTracker(BaseCache):
@@ -101,8 +102,8 @@ class CacheDebugPanel(DebugPanel):
'cache_time': self.cache.total_time,
'cache': self.cache,
}
- request.debug_toolbar.stats['cache'] = self.stats
- return response
+ toolbar = DebugToolbarMiddleware.get_current()
+ toolbar.stats['cache'] = self.stats
def content(self):
context = self.context.copy()