Skip to content

Commit 36699ba

Browse files
committed
Fix compatibility with django-debug-toolbar 2.0
Fixes #8
1 parent 4055557 commit 36699ba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

template_profiler_panel/panels/template.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ def _calc_timeline(self, start, end):
144144

145145
return result
146146

147-
def process_response(self, request, response):
147+
def process_request(self, request):
148+
response = super(TemplateProfilerPanel, self).process_request(request)
149+
148150
summary = defaultdict(float)
149151

150152
# Collect stats
@@ -169,3 +171,5 @@ def process_response(self, request, response):
169171
self.record_stats(
170172
{'templates': sorted(self.templates, key=lambda d: d['start']),
171173
'summary': sorted(summary.items(), key=lambda t: -t[1])})
174+
175+
return response

0 commit comments

Comments
 (0)