Skip to content
Snippets Groups Projects
Commit 3d08bfd2 authored by Dave St.Germain's avatar Dave St.Germain
Browse files

Fixes devstack settings to work with new version of debug toolbar

parent ab938c09
No related branches found
No related tags found
No related merge requests found
......@@ -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 #################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment