diff options
| author | Rickey Visinski | 2012-08-24 13:10:13 -0400 |
|---|---|---|
| committer | Rickey Visinski | 2012-08-24 13:10:13 -0400 |
| commit | 4d0b77e446c62e40387228aea39056424232b827 (patch) | |
| tree | 0182605f31a8bf2a82c79bbfcb52b9adfc559f15 /debug_toolbar | |
| parent | ee837a347ab48494df92ed0470f6729fe8f56db9 (diff) | |
| download | django-debug-toolbar-4d0b77e446c62e40387228aea39056424232b827.tar.bz2 | |
saving characters, and let django sort out the ajaxness
Diffstat (limited to 'debug_toolbar')
| -rw-r--r-- | debug_toolbar/middleware.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index e063b3b..1979e1d 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -116,9 +116,7 @@ class DebugToolbarMiddleware(object): __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']: |
