问题
I have followed the very terse guide provided for django-storages, transitioned from local file storage, and have come up against this exception:
Could not load Boto's S3 bindings.
settings.py
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = "xxxxxx"
AWS_SECRET_ACCESS_KEY = "xxxxxxxxx"
AWS_STORAGE_BUCKET_NAME = "images"
models.py
class CameraImage(models.Model):
...
image = models.ImageField(upload_to='images')#get_image_path)
What does that exception mean? How do I fix it?
回答1:
From looking at the source code, it appears you need to have the python-boto library installed. This is also mentioned in the documentation you link to.
回答2:
There's been an update it's now "pip install boto"
来源:https://stackoverflow.com/questions/10574834/error-could-not-load-botos-s3-bindings