From 74a7c2f3209b8561e71a140842877ee89fc6c725 Mon Sep 17 00:00:00 2001 From: bkonkle Date: Mon, 12 Sep 2011 11:25:35 -0500 Subject: Update the cache panel to use the toolbar object --- debug_toolbar/panels/cache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debug_toolbar') 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() -- cgit v1.2.3