Merge default STORAGES with setting from configuration.py

This commit is contained in:
Brian Tiemann 2025-04-13 18:49:38 -04:00
parent cdb5ee202a
commit ba5769f256

View File

@ -237,11 +237,10 @@ STORAGES = {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
}, },
} }
STORAGES.update(getattr(configuration, 'STORAGES', {}))
if STORAGE_BACKEND is not None: if STORAGE_BACKEND is not None:
STORAGES['default']['BACKEND'] = STORAGE_BACKEND STORAGES['default']['BACKEND'] = STORAGE_BACKEND
if STORAGE_CONFIG:
STORAGES['default']['OPTIONS'] = STORAGE_CONFIG
# django-storages # django-storages
if STORAGE_BACKEND.startswith('storages.'): if STORAGE_BACKEND.startswith('storages.'):