aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Leidel2012-08-27 03:40:28 -0700
committerJannis Leidel2012-08-27 03:40:28 -0700
commita492b1746d4a8e58a24b8b5c179dc8147ab57c9c (patch)
tree4a31eae94828d7ca00b030e8c606330d86ed025c
parent83ca90650be659adac89010211497771bc0b7425 (diff)
parent4d0b77e446c62e40387228aea39056424232b827 (diff)
downloaddjango-debug-toolbar-a492b1746d4a8e58a24b8b5c179dc8147ab57c9c.tar.bz2
Merge pull request #314 from rickeyvisinski-kanban/ignorexmlhttprequest
prevent debug toolbar from inserting itself into a partial template
-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 6e86223..1979e1d 100644
--- a/debug_toolbar/middleware.py
+++ b/debug_toolbar/middleware.py
@@ -116,7 +116,7 @@ class DebugToolbarMiddleware(object):
__traceback_hide__ = True
ident = thread.get_ident()
toolbar = self.__class__.debug_toolbars.get(ident)
- if not toolbar:
+ if not toolbar or request.is_ajax():
return response
if isinstance(response, HttpResponseRedirect):
if not toolbar.config['INTERCEPT_REDIRECTS']: