Skip to content

Commit

Permalink
saving characters, and let django sort out the ajaxness
Browse files Browse the repository at this point in the history
  • Loading branch information
rickeyvisinski-kanban committed Aug 24, 2012
1 parent ee837a3 commit 4d0b77e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions debug_toolbar/middleware.py
Expand Up @@ -116,9 +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:
return response
if 'XMLHttpRequest' in request.META.get('HTTP_X_REQUESTED_WITH', ''):
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 4d0b77e

Please sign in to comment.