From 608d7fbddc708e840458a2ca956f8f7991406eff Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Sun, 7 Sep 2008 10:19:11 -0700 Subject: Adding INTERNAL_IPS check to display toolbar — this may be a bit much but there will potentially be lots of things there you would not want to share to just anyone. --- debug_toolbar/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debug_toolbar/middleware.py') diff --git a/debug_toolbar/middleware.py b/debug_toolbar/middleware.py index b2e9b29..a13a735 100644 --- a/debug_toolbar/middleware.py +++ b/debug_toolbar/middleware.py @@ -19,7 +19,7 @@ class DebugToolbarMiddleware(object): self.debug_toolbar = None def process_request(self, request): - if settings.DEBUG: + if settings.DEBUG and request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS: self.debug_toolbar = DebugToolbar() self.debug_toolbar.load_panels() return None -- cgit v1.2.3