Skip to content

Commit a492b17

Browse files
committed
Merge pull request django-commons#314 from rickeyvisinski-kanban/ignorexmlhttprequest
prevent debug toolbar from inserting itself into a partial template
2 parents 83ca906 + 4d0b77e commit a492b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +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:
119+
if not toolbar or request.is_ajax():
120120
return response
121121
if isinstance(response, HttpResponseRedirect):
122122
if not toolbar.config['INTERCEPT_REDIRECTS']:

0 commit comments

Comments
 (0)