Skip to content

Commit 4d0b77e

Browse files
saving characters, and let django sort out the ajaxness
1 parent ee837a3 commit 4d0b77e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

debug_toolbar/middleware.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ def process_response(self, request, response):
116116
__traceback_hide__ = True
117117
ident = thread.get_ident()
118118
toolbar = self.__class__.debug_toolbars.get(ident)
119-
if not toolbar:
120-
return response
121-
if 'XMLHttpRequest' in request.META.get('HTTP_X_REQUESTED_WITH', ''):
119+
if not toolbar or request.is_ajax():
122120
return response
123121
if isinstance(response, HttpResponseRedirect):
124122
if not toolbar.config['INTERCEPT_REDIRECTS']:

0 commit comments

Comments
 (0)