From 440e21275a4a72ac37cc1481af1624494fca5859 Mon Sep 17 00:00:00 2001 From: Jawad Khan Date: Fri, 5 Dec 2025 17:17:14 +0500 Subject: [PATCH 1/2] fix: removed depricated storage vars --- credentials/settings/devstack.py | 10 ---------- credentials/settings/production.py | 10 +--------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/credentials/settings/devstack.py b/credentials/settings/devstack.py index f9da5e589..ae807ed9f 100644 --- a/credentials/settings/devstack.py +++ b/credentials/settings/devstack.py @@ -43,16 +43,6 @@ EMAIL_BACKEND = "django.core.mail.backends.filebased.EmailBackend" EMAIL_FILE_PATH = "/tmp/credentials-emails" -defaultfile_storage = os.environ.get("DEFAULT_FILE_STORAGE") - -if defaultfile_storage: - STORAGES["default"]["BACKEND"] = defaultfile_storage - -staticfiles_storage = os.environ.get("STATICFILES_STORAGE") - -if staticfiles_storage: - STORAGES["staticfiles"]["BACKEND"] = staticfiles_storage - MEDIA_URL = os.environ.get("MEDIA_URL", "/media/") STATIC_URL = os.environ.get("STATIC_URL", "/static/") diff --git a/credentials/settings/production.py b/credentials/settings/production.py index 0cd258d99..322e35208 100644 --- a/credentials/settings/production.py +++ b/credentials/settings/production.py @@ -45,19 +45,11 @@ vars().update(config_from_yaml) FILE_STORAGE_BACKEND = config_from_yaml.get("FILE_STORAGE_BACKEND", {}) - default_backend = FILE_STORAGE_BACKEND.pop("DEFAULT_FILE_STORAGE", None) - static_backend = FILE_STORAGE_BACKEND.pop("STATICFILES_STORAGE", None) # Load the files storage backend settings for django storages - # In django==4.2.24 following line sets the DEFAULT_FILE_STORAGE and other AWS variables as per YAML. + # In django==4.2.24 following line sets AWS variables as per YAML. vars().update(FILE_STORAGE_BACKEND) - if default_backend: - STORAGES["default"]["BACKEND"] = default_backend - - if static_backend: - STORAGES["staticfiles"]["BACKEND"] = static_backend - # make sure this happens after the configuration file overrides so format string can be overridden LOGGING = get_logger_config(format_string=LOGGING_FORMAT_STRING) From 2d06b08b8be1fde30433640fbb7cb58820e094be Mon Sep 17 00:00:00 2001 From: Jawad Khan Date: Tue, 9 Dec 2025 12:39:46 +0500 Subject: [PATCH 2/2] fix: fixed inline comment --- credentials/settings/production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credentials/settings/production.py b/credentials/settings/production.py index 322e35208..29df9878c 100644 --- a/credentials/settings/production.py +++ b/credentials/settings/production.py @@ -47,7 +47,7 @@ FILE_STORAGE_BACKEND = config_from_yaml.get("FILE_STORAGE_BACKEND", {}) # Load the files storage backend settings for django storages - # In django==4.2.24 following line sets AWS variables as per YAML. + # In django==5.2.7 the following line sets AWS variables as per YAML. vars().update(FILE_STORAGE_BACKEND) # make sure this happens after the configuration file overrides so format string can be overridden