Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding is_secure parameter as False #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions django_boto/s3/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class S3Storage(Storage):
"""

def __init__(self, bucket_name=None, key=None, secret=None, location=None,
host=None, policy=None, replace=True, force_http_url=False):
host=None, policy=None, replace=True, force_http_url=False, is_secure = False):

self.bucket_name = bucket_name if bucket_name else settings.BOTO_S3_BUCKET
self.key = key if key else settings.AWS_ACCESS_KEY_ID
Expand All @@ -40,7 +40,7 @@ def __init__(self, bucket_name=None, key=None, secret=None, location=None,
self.policy = policy if policy else settings.AWS_ACL_POLICY
self.force_http = force_http_url if force_http_url else settings.AWS_S3_FORCE_HTTP_URL
self.replace = replace

self.is_secure = is_secure
if hasattr(Location, self.location):
self.location = getattr(Location, self.location)

Expand All @@ -52,7 +52,7 @@ def bucket(self):
self.s3 = connect_s3(
aws_access_key_id=self.key,
aws_secret_access_key=self.secret,
host=self.host)
host=self.host, is_secure = self.is_secure)
try:
self._bucket = self.s3.create_bucket(
self.bucket_name, location=self.location, policy=self.policy)
Expand Down