* 19217 update and re-add django-debug-toolbar to INSTALLED_APPS * 19217 remove debug if not collectstatic
@@ -419,7 +419,7 @@ INSTALLED_APPS = [
'drf_spectacular',
'drf_spectacular_sidecar',
]
-if not DEBUG:
+if not DEBUG and 'collectstatic' not in sys.argv:
INSTALLED_APPS.remove('debug_toolbar')
# Middleware