From 6ce52b2532afaccca9932b7087533609fd239a9b Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sat, 19 Apr 2014 09:59:06 +0200 Subject: Fix #549 -- Avoid breaking on mod_python. (Please don't use mod_python.) --- debug_toolbar/toolbar.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debug_toolbar/toolbar.py b/debug_toolbar/toolbar.py index 03d4b7c..e63f1bc 100644 --- a/debug_toolbar/toolbar.py +++ b/debug_toolbar/toolbar.py @@ -89,7 +89,9 @@ class DebugToolbar(object): def should_render_panels(self): render_panels = self.config['RENDER_PANELS'] if render_panels is None: - render_panels = self.request.META['wsgi.multiprocess'] + # Django 1.4 still supports mod_python :( Fall back to the safe + # and inefficient default in that case. Revert when we drop 1.4. + render_panels = self.request.META.get('wsgi.multiprocess', True) return render_panels def store(self): -- cgit v1.2.3