From 68131cbf61cdde63d1c263ed5668f727fceb67b4 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Mon, 8 Sep 2008 11:08:03 -0700 Subject: Rewrite of toolbar HTML, CSS, and JS. Written by David Cramer with some tweaks. This also removes the jQuery dependency. --- debug_toolbar/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debug_toolbar/middleware.py') diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index 8883b37..7cfaac6 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -8,7 +8,7 @@ from debug_toolbar.toolbar.loader import DebugToolbar _HTML_TYPES = ('text/html', 'application/xhtml+xml') _END_HEAD_RE = re.compile(r'', re.IGNORECASE) -_END_BODY_RE = re.compile(r'', re.IGNORECASE) +_END_BODY_RE = re.compile(r'', re.IGNORECASE) class DebugToolbarMiddleware(object): """ @@ -36,5 +36,5 @@ class DebugToolbarMiddleware(object): if response['Content-Type'].split(';')[0] in _HTML_TYPES and not request.is_ajax(): # Saving this here in case we ever need to inject into #response.content = _END_HEAD_RE.sub(smart_str(self.debug_toolbar.render_styles() + "%s" % match.group()), response.content) - response.content = _END_BODY_RE.sub(smart_str(self.debug_toolbar.render_toolbar() + ''), response.content) + response.content = _END_BODY_RE.sub(smart_str('' + self.debug_toolbar.render_toolbar()), response.content) return response -- cgit v1.2.3