misc: hide debug toolbar in skeleton view (#41597)
This commit is contained in:
parent
9ddff4fab0
commit
c81470efcf
|
@ -356,6 +356,16 @@ BOOKING_CALENDAR_CELL_ENABLED = False
|
|||
LEGACY_CHART_CELL_ENABLED = False
|
||||
NEWSLETTERS_CELL_ENABLED = False
|
||||
|
||||
|
||||
def debug_show_toolbar(request):
|
||||
from debug_toolbar.middleware import show_toolbar as dt_show_toolbar
|
||||
return dt_show_toolbar(request) and not request.path.startswith('/__skeleton__/')
|
||||
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'SHOW_TOOLBAR_CALLBACK': debug_show_toolbar
|
||||
}
|
||||
|
||||
|
||||
local_settings_file = os.environ.get('COMBO_SETTINGS_FILE',
|
||||
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
||||
if os.path.exists(local_settings_file):
|
||||
|
|
Loading…
Reference in New Issue