diff options
| author | Gavin Wahl | 2012-06-15 10:10:01 -0600 | 
|---|---|---|
| committer | Gavin Wahl | 2012-06-15 10:10:01 -0600 | 
| commit | 46f5ef3d53fd7196855f3810a260373c59acc54a (patch) | |
| tree | 97229ee4b7d49be76b59a8d35b9f614462a2c9bb /debug_toolbar/middleware.py | |
| parent | 7b610e9150985a3350d79f763f9afb59433d7df6 (diff) | |
| download | django-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.py | 2 | 
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: | 
