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>
19 lines
526 B
Python
19 lines
526 B
Python
from .base import * # noqa
|
|
|
|
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
|
|
|
|
INSTALLED_APPS += ["debug_toolbar"]
|
|
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware", *MIDDLEWARE]
|
|
except Exception:
|
|
pass
|