Felipe Martín avatar Felipe Martín committed 24ae8cb

Updated host/port defaults matching @k4ml suggestion

Comments (0)

Files changed (1)

storages/backends/s3boto.py

         'application/x-javascript',
     ))
     url_protocol = setting('AWS_S3_URL_PROTOCOL', 'http:')
-    host = setting('AWS_S3_HOST', None)
+    host = setting('AWS_S3_HOST', S3Connection.DefaultHost)
     use_ssl = setting('AWS_S3_USE_SSL', True)
     port = setting('AWS_S3_PORT', None)
 
     @property
     def connection(self):
         if self._connection is None:
-            if self.host is None:
-                # Using real Amazon S3 server
-                self._connection = self.connection_class(
-                    self.access_key,
-                    self.secret_key,
-                    is_secure=self.use_ssl,
-                    calling_format=self.calling_format
-                )
-            else:
-                # Using custom S3 server
-                self._connection = self.connection_class(
-                    self.access_key,
-                    self.secret_key,
-                    is_secure=self.use_ssl,
-                    calling_format=self.calling_format,
-                    host=self.host,
-                    port=self.port
-                )
+            self._connection = self.connection_class(
+                self.access_key,
+                self.secret_key,
+                is_secure=self.use_ssl,
+                calling_format=self.calling_format,
+                host=self.host,
+                port=self.port,
+            )
         return self._connection
 
     @property
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.