1
Fork 0

Disable some DDT panels

This commit is contained in:
Jake Howard 2024-05-25 17:15:24 +01:00
parent 9301f295cc
commit b530b2b3b5
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -184,10 +184,6 @@ LOGGING = {
}, },
} }
DEBUG_TOOLBAR_CONFIG = {
"SHOW_TOOLBAR_CALLBACK": "yamdl_playground.core.utils.show_debug_toolbar"
}
if "ENABLE_ADMIN" in os.environ: if "ENABLE_ADMIN" in os.environ:
INSTALLED_APPS.extend([ INSTALLED_APPS.extend([
@ -217,3 +213,23 @@ if "ENABLE_ADMIN" in os.environ:
if "ENABLE_DDT" in os.environ: if "ENABLE_DDT" in os.environ:
INSTALLED_APPS.append("debug_toolbar") INSTALLED_APPS.append("debug_toolbar")
MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware") MIDDLEWARE.append("debug_toolbar.middleware.DebugToolbarMiddleware")
DEBUG_TOOLBAR_CONFIG = {
"SHOW_TOOLBAR_CALLBACK": "yamdl_playground.core.utils.show_debug_toolbar"
}
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.history.HistoryPanel',
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
# 'debug_toolbar.panels.signals.SignalsPanel',
# 'debug_toolbar.panels.redirects.RedirectsPanel',
# 'debug_toolbar.panels.profiling.ProfilingPanel',
]