Skip to content

Commit

Permalink
Merge pull request #314 from rickeyvisinski-kanban/ignorexmlhttprequest
Browse files Browse the repository at this point in the history
prevent debug toolbar from inserting itself into a partial template
  • Loading branch information
jezdez committed Aug 27, 2012
2 parents 83ca906 + 4d0b77e commit a492b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debug_toolbar/middleware.py
Expand Up @@ -116,7 +116,7 @@ def process_response(self, request, response):
__traceback_hide__ = True
ident = thread.get_ident()
toolbar = self.__class__.debug_toolbars.get(ident)
if not toolbar:
if not toolbar or request.is_ajax():
return response
if isinstance(response, HttpResponseRedirect):
if not toolbar.config['INTERCEPT_REDIRECTS']:
Expand Down

0 comments on commit a492b17

Please sign in to comment.