Disable all debug toolbar panels by default (cuts down 80% of request time locally)

This commit is contained in:
Raphael Michel
2020-12-09 16:04:45 +01:00
parent 13e464bcf1
commit a204302910

View File

@@ -374,10 +374,16 @@ MIDDLEWARE = [
] ]
try: try:
import debug_toolbar # noqa import debug_toolbar.settings # noqa
if DEBUG: if DEBUG:
INSTALLED_APPS.append('debug_toolbar.apps.DebugToolbarConfig') INSTALLED_APPS.append('debug_toolbar.apps.DebugToolbarConfig')
MIDDLEWARE.insert(0, 'debug_toolbar.middleware.DebugToolbarMiddleware') MIDDLEWARE.insert(0, 'debug_toolbar.middleware.DebugToolbarMiddleware')
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_CONFIG = {
'JQUERY_URL': '',
'DISABLE_PANELS': debug_toolbar.settings.PANELS_DEFAULTS,
}
pass
except ImportError: except ImportError:
pass pass
@@ -561,14 +567,6 @@ COMPRESS_CSS_FILTERS = (
'compressor.filters.cssmin.CSSCompressorFilter', 'compressor.filters.cssmin.CSSCompressorFilter',
) )
# Debug toolbar
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_CONFIG = {
'JQUERY_URL': '',
}
INTERNAL_IPS = ('127.0.0.1', '::1') INTERNAL_IPS = ('127.0.0.1', '::1')
MESSAGE_TAGS = { MESSAGE_TAGS = {