Skip to content

Commit e5638a6

Browse files
committed
Display abbreviated view function name as request panel's subtitle
That's hopefully the most commonly required information from the panel.
1 parent 80fafc6 commit e5638a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

debug_toolbar/panels/request.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ class RequestPanel(Panel):
1717

1818
title = _("Request")
1919

20+
@property
21+
def nav_subtitle(self):
22+
"""
23+
Show abbreviated name of view function as subtitle
24+
"""
25+
view_func = self.get_stats().get('view_func', '')
26+
return view_func.rsplit('.', 1)[-1]
27+
2028
def process_response(self, request, response):
2129
self.record_stats({
2230
'get': [(k, request.GET.getlist(k)) for k in sorted(request.GET)],

0 commit comments

Comments
 (0)