Skip to content

Commit

Permalink
fix: defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Dec 2, 2024
1 parent 0c705ce commit 3c8c30c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,20 @@

# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")

AWS_S3_CUSTOM_DOMAIN = os.getenv("AWS_S3_CUSTOM_DOMAIN")
AWS_LOCATION = os.getenv("AWS_LOCATION")
if AWS_S3_CUSTOM_DOMAIN == "":
AWS_S3_CUSTOM_DOMAIN = None
AWS_LOCATION = os.getenv("AWS_LOCATION", "")
AWS_DEFAULT_ACL = os.getenv("AWS_DEFAULT_ACL")
if AWS_DEFAULT_ACL == "":
AWS_DEFAULT_ACL = None
AWS_S3_ADDRESSING_STYLE = os.getenv("AWS_S3_ADDRESSING_STYLE")
if AWS_S3_ADDRESSING_STYLE == "":
AWS_S3_ADDRESSING_STYLE = None
AWS_S3_REGION_NAME = os.getenv("AWS_S3_REGION_NAME")

if AWS_S3_REGION_NAME == "":
AWS_S3_REGION_NAME = None
if AWS_STORAGE_BUCKET_NAME:
DEFAULT_FILE_STORAGE = "storages.backends.s3.S3Storage"
STATICFILES_STORAGE = "storages.backends.s3.S3Storage"

0 comments on commit 3c8c30c

Please sign in to comment.