From 5013c1a31ad73cd9e2b7fb5b5803fc7504af0067 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Mon, 20 Apr 2026 14:28:09 +0545 Subject: [PATCH] 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. --- src/djinit/templates/config/settings/base.py-tpl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/djinit/templates/config/settings/base.py-tpl b/src/djinit/templates/config/settings/base.py-tpl index ccdb901..1e0c491 100644 --- a/src/djinit/templates/config/settings/base.py-tpl +++ b/src/djinit/templates/config/settings/base.py-tpl @@ -112,7 +112,14 @@ STATIC_ROOT = BASE_DIR / "staticfiles" MEDIA_URL = "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"