diff --git a/config/settings/base.py b/config/settings/base.py index b0c83d67c..69426e779 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -64,7 +64,10 @@ "compressor.finders.CompressorFinder", ] -STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" +STORAGES = { + "default": {"BACKEND": "storages.backends.s3.S3Storage"}, + "staticfiles": {"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage"}, +} STATICFILES_FINDERS += ["compressor.finders.CompressorFinder"] diff --git a/config/settings/prod.py b/config/settings/prod.py index 3d1b9f0ed..f2b277045 100644 --- a/config/settings/prod.py +++ b/config/settings/prod.py @@ -22,7 +22,8 @@ MEDIA_URL = f"https://{S3_STORAGE_ENDPOINT_DOMAIN}/" # noqa -STORAGES = {"default": {"BACKEND": "storages.backends.s3.S3Storage"}} +# flake8: noqa F405 +STORAGES |= {"default": {"BACKEND": "storages.backends.s3.S3Storage"}} # Sentry diff --git a/config/settings/staging.py b/config/settings/staging.py index 2b7d2e9c1..679f154f2 100644 --- a/config/settings/staging.py +++ b/config/settings/staging.py @@ -25,7 +25,8 @@ MEDIA_URL = f"https://{S3_STORAGE_ENDPOINT_DOMAIN}/" # noqa -STORAGES = {"default": {"BACKEND": "storages.backends.s3.S3Storage"}} +# flake8: noqa F405 +STORAGES |= {"default": {"BACKEND": "storages.backends.s3.S3Storage"}} # Sentry diff --git a/config/settings/test.py b/config/settings/test.py index ef69c2bbf..b18c9168a 100644 --- a/config/settings/test.py +++ b/config/settings/test.py @@ -9,7 +9,9 @@ logging.disable(logging.CRITICAL) # `ManifestStaticFilesStorage` (used in base settings) requires `collectstatic` to be run. -STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" +# flake8: noqa F405 +STORAGES |= {"staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}} + COMPRESS_OFFLINE = False EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"