【发布时间】:2016-02-12 16:27:07
【问题描述】:
我现在感觉很傻
我正在尝试使用django-storages
我安装了
pip install django-storages
然后,将'storages', 添加到 settings.py 中
然后在settings.py中
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'
AWS_ACCESS_KEY_ID = 'xxx'
AWS_SECRET_ACCESS_KEY = 'yyy'
AWS_STORAGE_BUCKET_NAME = 'mybucketname'
并尝试查看是否更改了默认文件存储:
>>> from django.core.files.storage import default_storage
>>> print default_storage.connection
....
ImproperlyConfigured: Could not load amazon's s3 bindings.
我错过了什么
【问题讨论】:
-
您是否安装了
boto?安装它有什么不同吗?谢谢。 -
pip install boto^^ 只是为了捎带 -
@jape 我做到了,没有任何成功的迹象
标签: python django amazon-s3 django-storage