feat(src/djinit/templates/config/settings): introduce explicit storage configuration
* New Features * Replace the singular `STATICFILES_STORAGE` assignment with a `STORAGES` dictionary defining `default` and `staticfiles` backends. * Enhancements * Add `DEFAULT_AUTO_FIELD` setting for consistency with recent Django recommendations. * Make storage backend definitions clearer and more extensible. * Bug Fixes * None.
This commit is contained in:
1 file changed
+8
-1
@@ -112,7 +112,14 @@ STATIC_ROOT = BASE_DIR / "staticfiles"
|
|||||||
MEDIA_URL = "media/"
|
MEDIA_URL = "media/"
|
||||||
MEDIA_ROOT = BASE_DIR / "media"
|
MEDIA_ROOT = BASE_DIR / "media"
|
||||||
|
|
||||||
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
STORAGES = {
|
||||||
|
"default": {
|
||||||
|
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
||||||
|
},
|
||||||
|
"staticfiles": {
|
||||||
|
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user