diff --git a/greenweb/settings/common.py b/greenweb/settings/common.py index db23ac12..728db615 100644 --- a/greenweb/settings/common.py +++ b/greenweb/settings/common.py @@ -275,14 +275,20 @@ LANGUAGE_CODE = "en-us" TIME_ZONE = "UTC" USE_I18N = True -USE_L10N = True # Email settings DEFAULT_FROM_EMAIL = "support@thegreenwebfoundation.org" # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/dev/howto/static-files/ -STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage", + }, +} STATIC_URL = "/static/" STATICFILES_DIRS = [ diff --git a/greenweb/settings/development.py b/greenweb/settings/development.py index 91572e3a..26c73388 100644 --- a/greenweb/settings/development.py +++ b/greenweb/settings/development.py @@ -34,7 +34,12 @@ MEDIA_ROOT = ROOT("media") MEDIA_URL = "/media/" -DEFAULT_FILE_STORAGE = "django.core.files.storage.FileSystemStorage" +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", + }, +} DOMAIN_SNAPSHOT_BUCKET = "tgwf-green-domains-test" - -STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" diff --git a/greenweb/settings/production.py b/greenweb/settings/production.py index 0ec74e4f..b950d454 100644 --- a/greenweb/settings/production.py +++ b/greenweb/settings/production.py @@ -23,7 +23,14 @@ DOMAIN_SNAPSHOT_BUCKET = "tgwf-green-domains-live" # Used by django storages for storing files -DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" +STORAGES = { + "default": { + "BACKEND": "storages.backends.s3boto3.S3Boto3Storage", + }, + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", + }, +} # Scaleway deets AWS_ACCESS_KEY_ID = env("OBJECT_STORAGE_ACCESS_KEY_ID") # noqa diff --git a/greenweb/settings/testing.py b/greenweb/settings/testing.py index 42059203..a30dd250 100644 --- a/greenweb/settings/testing.py +++ b/greenweb/settings/testing.py @@ -5,7 +5,14 @@ DOMAIN_SNAPSHOT_BUCKET = "tgwf-green-domains-test" # http://whitenoise.evans.io/en/stable/django.html#WHITENOISE_MANIFEST_STRICT -STATICFILES_STORAGE = "django.contrib.staticfiles.storage.StaticFilesStorage" +STORAGES = { + "default": { + "BACKEND": "django.core.files.storage.FileSystemStorage", + }, + "staticfiles": { + "BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage", + }, +} # override settings, so we don't need to run rabbitmq in testing # For more, see https://github.com/Bogdanp/django_dramatiq#testing