Skip to content
Browse files

saving characters, and let django sort out the ajaxness

  • Loading branch information...
1 parent ee837a3 commit 4d0b77e446c62e40387228aea39056424232b827 @rickeyvisinski-kanban rickeyvisinski-kanban committed Aug 24, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 debug_toolbar/middleware.py
View
4 debug_toolbar/middleware.py
@@ -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']:

0 comments on commit 4d0b77e

Please sign in to comment.
Something went wrong with that request. Please try again.