Commit b4086504 by Dave St.Germain

Merge pull request #2627 from edx/dcs/fix-devstack-toolbar

Fixes devstack settings to work with new version of debug toolbar
parents ab938c09 3d08bfd2
......@@ -54,7 +54,8 @@ DEBUG_TOOLBAR_PANELS = (
)
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False
'INTERCEPT_REDIRECTS': False,
'SHOW_TOOLBAR_CALLBACK': 'check_debug.should_show_debug_toolbar',
}
# To see stacktraces for MongoDB queries, set this to True.
......
"""
Function to check debug status.
"""
import os
def should_show_debug_toolbar(request):
"""
Return True/False to determine whether to show the Django
Debug Toolbar.
If HIDE_TOOLBAR is set in the process environment, the
toolbar will be hidden.
"""
return not bool(os.getenv('HIDE_TOOLBAR', ''))
......@@ -53,7 +53,7 @@ DEBUG_TOOLBAR_PANELS = (
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
'SHOW_TOOLBAR_CALLBACK': lambda _: True,
'SHOW_TOOLBAR_CALLBACK': 'check_debug.should_show_debug_toolbar',
}
########################### PIPELINE #################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment