19217 remove debug if not collectstatic

This commit is contained in:
Arthur 2025-04-23 08:50:16 -07:00
parent c69bea4a44
commit b987b725d3

View File

@ -419,6 +419,8 @@ INSTALLED_APPS = [
'drf_spectacular', 'drf_spectacular',
'drf_spectacular_sidecar', 'drf_spectacular_sidecar',
] ]
if not DEBUG and 'collectstatic' not in sys.argv:
INSTALLED_APPS.remove('debug_toolbar')
# Middleware # Middleware
MIDDLEWARE = [ MIDDLEWARE = [