File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ class DebugPanel(object):
18
18
# Panel methods
19
19
def __init__ (self , context = {}):
20
20
self .context .update (context )
21
- self .toolbar = DebugToolbarMiddleware .get_current ()
22
21
self .slug = slugify (self .name )
23
22
24
23
def dom_id (self ):
@@ -46,14 +45,16 @@ def content(self):
46
45
return render_to_string (self .template , context )
47
46
48
47
def record_stats (self , stats ):
49
- panel_stats = self .toolbar .stats .get (self .slug )
48
+ toolbar = DebugToolbarMiddleware .get_current ()
49
+ panel_stats = toolbar .stats .get (self .slug )
50
50
if panel_stats :
51
51
panel_stats .update (stats )
52
52
else :
53
- self . toolbar .stats [self .slug ] = stats
53
+ toolbar .stats [self .slug ] = stats
54
54
55
55
def get_stats (self ):
56
- return self .toolbar .stats .get (self .slug , {})
56
+ toolbar = DebugToolbarMiddleware .get_current ()
57
+ return toolbar .stats .get (self .slug , {})
57
58
58
59
# Standard middleware methods
59
60
def process_request (self , request ):
You can’t perform that action at this time.
0 commit comments