from S3 import CallingFormat, seems broke

Issue #181 new
Brent O'Connor created an issue

From the docs it says ...

The way you’d like to call the Amazon Web Services API, for instance if you prefer subdomains:

from S3 import CallingFormat

However django-storages doesn't seem to install the S3 library ...

>>> from S3 import CallingFormat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named S3

I think the docs should include instructions on how to install it or should be modified to install it.

Comments (9)

  1. Ian Wilson

    Is there a reason this file isn't included in the library itself? Seems like it could be included under storages/libs/ or something similar. The license at the top of the file seems permissible enough for that to be fine.

  2. Brad Bode

    I've had this issue for some time. I can't do much until I have a good workaround. Phoenix, you suggested copying the S3 code, but, in my inexperience, I don't understand where to copy it to. Can you give me a hint?

  3. Brad Bode

    So I tried putting the S3 code into the location you suggested. That did not change the URL pattern produced when setting the Calling Format. Instead I was able to do the following (set it directly in boto):

    from boto.s3.connection import OrdinaryCallingFormat AWS_S3_CALLING_FORMAT = OrdinaryCallingFormat()

    This seemed to do the trick for generating the path calling format for now.

  4. Avneesh Chadha

    I am facing the same issue. I just upgraded from django-storages 1.1.4 to 1.1.8, because there was a bug in the 1.1.4 which would not allow me to gzip things being pushed to the S3 bucket. But after upgrading to 1.1.8, the following gives me an error

    from S3 import CallingFormat and then I do CallingFormat.subdomain

    though this was working fine with the 1.1.4 version.

    I get "No module named S3". Can anyone tell what to do with this?

  5. Log in to comment