Skip to content

Commit 7f06dc6

Browse files
committed
Revert to S3
1 parent 330f73e commit 7f06dc6

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

config/settings/production.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@
8787
aws_s3_domain = AWS_S3_CUSTOM_DOMAIN or f"{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com"
8888
# STATIC
8989
# ------------------------
90-
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
91-
# COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy"
92-
# STATIC_URL = f"https://{aws_s3_domain}/static/"
90+
STATICFILES_STORAGE = "course_api.utils.storages.StaticRootS3Boto3Storage"
91+
COLLECTFAST_STRATEGY = "collectfast.strategies.boto3.Boto3Strategy"
92+
STATIC_URL = f"https://{aws_s3_domain}/static/"
9393
# MEDIA
9494
# ------------------------------------------------------------------------------
9595
DEFAULT_FILE_STORAGE = "course_api.utils.storages.MediaRootS3Boto3Storage"
9696
MEDIA_URL = f"https://{aws_s3_domain}/media/"
97-
97+
9898
# EMAIL
9999
# ------------------------------------------------------------------------------
100100
# https://docs.djangoproject.com/en/dev/ref/settings/#default-from-email
@@ -139,7 +139,7 @@
139139
# Collectfast
140140
# ------------------------------------------------------------------------------
141141
# https://github.com/antonagestam/collectfast#installation
142-
# INSTALLED_APPS = ["collectfast"] + INSTALLED_APPS # noqa F405
142+
INSTALLED_APPS = ["collectfast"] + INSTALLED_APPS # noqa F405
143143

144144
# LOGGING
145145
# ------------------------------------------------------------------------------
@@ -204,4 +204,3 @@
204204

205205
# Your stuff...
206206
# ------------------------------------------------------------------------------
207-
MIDDLEWARE+=["whitenoise.middleware.WhiteNoiseMiddleware"]

requirements/production.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ sentry-sdk==1.5.4 # https://github.com/getsentry/sentry-python
1111
# ------------------------------------------------------------------------------
1212
django-storages[boto3]==1.12.3 # https://github.com/jschneier/django-storages
1313
django-anymail[sendgrid]==8.5 # https://github.com/anymail/django-anymail
14-
15-
# Whitenoise
16-
whitenoise==6.0.0

0 commit comments

Comments
 (0)