Skip to content

Commit

Permalink
Update debug_settings.py to disable debug panels by default
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller authored Sep 23, 2024
1 parent 9e9683d commit c344d76
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/public/cantusdata/debug_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@
DEBUG = is_development

DEBUG_TOOLBAR_CONFIG = {
"DISABLE_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.logging.LoggingPanel",
"debug_toolbar.panels.redirects.RedirectsPanel",
"debug_toolbar.panels.profiling.ProfilingPanel",
},
"SHOW_TOOLBAR_CALLBACK": lambda request: (
False if request.headers.get("x-requested-with") == "XMLHttpRequest" else True
),
Expand Down

0 comments on commit c344d76

Please sign in to comment.