aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Hudson2008-09-07 10:19:11 -0700
committerRob Hudson2008-09-07 10:19:11 -0700
commit608d7fbddc708e840458a2ca956f8f7991406eff (patch)
tree85cfd17fdf1803227f367340762ba24ac840233d
parent9855a9dac9cad37fb1b36d23e794b91513789680 (diff)
downloaddjango-debug-toolbar-608d7fbddc708e840458a2ca956f8f7991406eff.tar.bz2
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.
-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 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