Add AWS region setting

This commit is contained in:
Ramon Wenger 2019-10-24 15:04:01 +02:00
parent 91c278cae7
commit 02ddc4ecf4
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ AWS_STORAGE_BUCKET_NAME = os.environ.get('AWS_STORAGE_BUCKET_NAME')
AWS_S3_FILE_OVERWRITE = False
# use with cloudfront
AWS_S3_CUSTOM_DOMAIN = '%s.s3-eu-west-1.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
AWS_S3_CUSTOM_DOMAIN = '{}.s3-{}.amazonaws.com'.format(AWS_STORAGE_BUCKET_NAME, os.environ.get('AWS_REGION', 'eu-west-1'))
if USE_AWS:
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
# use with cloudfront