aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/middleware.py
diff options
context:
space:
mode:
authorGavin Wahl2012-06-15 10:10:01 -0600
committerGavin Wahl2012-06-15 10:10:01 -0600
commit46f5ef3d53fd7196855f3810a260373c59acc54a (patch)
tree97229ee4b7d49be76b59a8d35b9f614462a2c9bb /debug_toolbar/middleware.py
parent7b610e9150985a3350d79f763f9afb59433d7df6 (diff)
downloaddjango-debug-toolbar-46f5ef3d53fd7196855f3810a260373c59acc54a.tar.bz2
Do not intercept redirects for ajax requests
Diffstat (limited to 'debug_toolbar/middleware.py')
-rw-r--r--debug_toolbar/middleware.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py
index af898f1..14cbb95 100644
--- a/debug_toolbar/middleware.py
+++ b/debug_toolbar/middleware.py
@@ -115,7 +115,7 @@ class DebugToolbarMiddleware(object):
if not toolbar:
return response
if isinstance(response, HttpResponseRedirect):
- if not toolbar.config['INTERCEPT_REDIRECTS']:
+ if not toolbar.config['INTERCEPT_REDIRECTS'] or request.is_ajax():
return response
redirect_to = response.get('Location', None)
if redirect_to: