Commits

Anonymous committed 642fc34

supporting different hosts than s3.amazonaws.com

Comments (0)

Files changed (1)

storages/backends/s3.py

     raise ImproperlyConfigured("Could not load amazon's S3 bindings.\nSee "
         "http://developer.amazonwebservices.com/connect/entry.jspa?externalID=134")
 
+S3_HOST             = getattr(settings, 'AWS_HOST', 's3.amazonaws.com')
 ACCESS_KEY_NAME     = getattr(settings, 'AWS_ACCESS_KEY_ID', None)
 SECRET_KEY_NAME     = getattr(settings, 'AWS_SECRET_ACCESS_KEY', None)
 HEADERS             = getattr(settings, 'AWS_HEADERS', {})
             access_key, secret_key = self._get_access_keys()
 
         self.connection = AWSAuthConnection(access_key, secret_key,
+                            server=S3_HOST,
                             calling_format=calling_format)
         self.generator = QueryStringAuthGenerator(access_key, secret_key,
                             calling_format=calling_format,