Skip to content

Upgrade STORAGES setting to the new pattern #12221

@humitos

Description

@humitos

This is a follow up of the changes introduced in:

We upgrade our settings to be like:

    @property
    def STORAGES(self):
        return {
            "staticfiles": {
                "BACKEND": self.RTD_STATICFILES_STORAGE,
                "OPTIONS": {
                    "bucket_acl": "public-read",
                    "default_acl": "public-read",
                    "querystring_auth": False,
                },
            },

            "build-media": {
                "BACKEND": self.RTD_BUILD_MEDIA_STORAGE,
                "OPTIONS": {
                    "bucket_name": self.S3_MEDIA_STORAGE_BUCKET,
                    "custom_domain": self.S3_MEDIA_STORAGE_OVERRIDE_HOSTNAME,
                    "bucket_acl": "public-read",
                    "default_acl": "public-read",
                    "querystring_auth": False,
                },
            },

            # ... other storage backends here like `build-tools` and more ...
        }

With this, we will be able to delete all our classes and mixins to deal with multiple storages and make the code cleaner while using the Django standards:

Metadata

Metadata

Labels

AcceptedAccepted issue on our roadmapImprovementMinor improvement to code

Type

No type

Projects

Status

Needs review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions