2
我根據羅伯託羅薩里奧的第二條消息在此鏈接(https://groups.google.com/forum/#!topic/mayan-edms/tZjmn5u4y2A)設置與s3的瑪雅edms,但我現在有一些錯誤。瑪雅edms與s3
儘管我在production.py中添加了s3存儲桶設置,但存儲/後端/的s3.py無法加載設置。
以下是錯誤。
File "/home/proj/mayan-edms/lib/python2.7/site-packages/mayan/settings/production.py", line 42, in <module>
from storages.backends.s3 import S3Storage
File "/home/proj/mayan-edms/lib/python2.7/site-packages/storages/backends/s3.py", line 42, in <module>
class S3Storage(Storage):
File "/home/proj/mayan-edms/lib/python2.7/site-packages/storages/backends/s3.py", line 45, in S3Storage
def __init__(self, bucket=settings.AWS_STORAGE_BUCKET_NAME,
File "/home/proj/mayan-edms/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'AWS_STORAGE_BUCKET_NAME'
而且在production.py的設置是這樣的。
from django.conf import settings
settings.INSTALLED_APPS += ('storages',)
AWS_ACCESS_KEY_ID = 'KEY_ID'
AWS_SECRET_ACCESS_KEY = 'ACCESS_KEY'
AWS_STORAGE_BUCKET_NAME = 'BUCKET_NAME'
AWS_QUERYSTRING_AUTH = False
from storages.backends.s3 import S3Storage
DOCUMENTS_STORAGE_BACKEND=S3Storage
DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'
在此先感謝。