Last active
September 17, 2024 23:57
-
-
Save rodrigobertin/81b36da88d0d1d237fda02e92ef2820b to your computer and use it in GitHub Desktop.
Django 5.1 Storages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS_S3_ENDPOINT_URL = f'https://{os.environ.get("BUCKET_NAMESPACE")}.compat.objectstorage.{os.environ.get("BUCKET_REGION")}.oraclecloud.com' | |
STORAGES = { | |
"default": { | |
"BACKEND": "storages.backends.s3.S3Storage", | |
"OPTIONS": { | |
"access_key": os.environ.get('BUCKET_KEY'), | |
"secret_key": os.environ.get('BUCKET_SECRET'), | |
"bucket_name": os.environ.get('BUCKET_NAME'), | |
"region_name": os.environ.get('BUCKET_REGION'), | |
"endpoint_url": AWS_S3_ENDPOINT_URL, | |
"querystring_auth": False, | |
"file_overwrite": False, | |
}, | |
}, | |
"staticfiles": { | |
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment