Skip to content

Commit

Permalink
Merge pull request #92 from parkan/patch-1
Browse files Browse the repository at this point in the history
Allow specifying endpoint url for S3
  • Loading branch information
meeb authored Jun 12, 2024
2 parents 69a18a6 + ded6dbc commit 324b888
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion django_distill/backends/amazon_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ def account_container(self):
def authenticate(self, calling_format=None):
access_key_id = self.account_username()
secret_access_key = self.options.get('SECRET_ACCESS_KEY', '')
endpoint_url = self.options.get('ENDPOINT_URL', '')
bucket = self.account_container()
if access_key_id and secret_access_key:
self.d['connection'] = boto3.client('s3', aws_access_key_id=access_key_id,
aws_secret_access_key=secret_access_key)
aws_secret_access_key=secret_access_key,
endpoint_url=endpoint_url)
else:
self.d['connection'] = boto3.client('s3')
self.d['bucket'] = bucket
Expand Down

0 comments on commit 324b888

Please sign in to comment.