Browse Source

Enable debug toolbar on sandbox build

master
David Winterbottom 13 years ago
parent
commit
f5066af96c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      sites/sandbox/settings.py

+ 7
- 0
sites/sandbox/settings.py View File

249
     },
249
     },
250
 }
250
 }
251
 
251
 
252
+# Allow internal IPs to see the debug toolbar.  This is just for Tangent's QA
253
+# department to be able to create better issues when something goes wrong.
254
+def is_internal(request):
255
+    ip_addr = request.META['REMOTE_ADDR']
256
+    return ip_addr in INTERNAL_IPS or ip_addr.startswith('192.168')
257
+
252
 DEBUG_TOOLBAR_CONFIG = {
258
 DEBUG_TOOLBAR_CONFIG = {
253
     'INTERCEPT_REDIRECTS': False,
259
     'INTERCEPT_REDIRECTS': False,
260
+    'SHOW_TOOLBAR_CALLBACK': is_internal
254
 }
261
 }
255
 
262
 
256
 AUTH_PROFILE_MODULE = 'user.Profile'
263
 AUTH_PROFILE_MODULE = 'user.Profile'

Loading…
Cancel
Save