fix: use plain StaticFilesStorage in dev settings
CompressedManifestStaticFilesStorage requires collectstatic to generate a manifest before it can serve anything. Dev containers never run collectstatic so every static asset 404s. Override to StaticFilesStorage in dev so Django serves files directly from STATICFILES_DIRS and app static directories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,11 @@ DEBUG = True
|
||||
|
||||
INTERNAL_IPS = ["127.0.0.1"]
|
||||
|
||||
# Use plain static file storage in dev — CompressedManifestStaticFilesStorage
|
||||
# (set in base.py) requires collectstatic to have been run and will 404 on
|
||||
# every asset otherwise.
|
||||
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage"
|
||||
|
||||
try:
|
||||
import debug_toolbar # noqa: F401
|
||||
|
||||
|
||||
Reference in New Issue
Block a user