0

我使用django-s3-folder-storage将 S3 集成到我的 Django 项目中,当我运行python manage.py collectstatic将静态文件上传到存储桶时可以,但是当我尝试将图像上传到管理站点中的存储桶时,它会引发错误Permission denied

OSError at /admin/picture/picture/1/
[Errno 13] Permission denied: '/media/draw_share_picture'
Request Method: POST
Request URL:    http://127.0.0.1:8000/admin/picture/picture/1/
Django Version: 1.3.1
Exception Type: OSError
Exception Value:    
[Errno 13] Permission denied: '/media/draw_share_picture'
Exception Location: /home/ragnarok/Projects/drawshare/venv/lib/python2.7/os.py in makedirs, line 157
Python Executable:  /home/ragnarok/Projects/drawshare/venv/bin/python
Python Version: 2.7.3
Python Path:    
['/home/ragnarok/Projects/drawshare/drawShare',
 '/usr/lib/python2.7/site-packages/liquidluck-0.3-py2.7.egg',
 '/usr/lib/python2.7/site-packages/houdini.py-0.1.0-py2.7-linux-i686.egg',
 '/usr/lib/python2.7/site-packages/misaka-1.0.2-py2.7-linux-i686.egg',
 '/usr/lib/python2.7/site-packages/docutils-0.9.1-py2.7.egg',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/site-packages/distribute-0.6.27-py2.7.egg',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
 '/home/ragnarok/Projects',
 '/usr/lib/python2.7/site-packages',
 '/home/ragnarok/Projects/drawshare/drawShare',
 '/usr/lib/python2.7/site-packages/PIL',
 '/usr/lib/python2.7/site-packages/gtk-2.0',
 '/usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info',
 '/home/ragnarok/Projects/drawshare/venv/lib/python27.zip',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/plat-linux2',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/lib-tk',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/lib-old',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/home/ragnarok/Projects/drawshare/venv/lib/python2.7/site-packages']

为什么?

4

1 回答 1

0

你能做到吗,诸神黄昏?尝试在您的应用程序中运行django-s3-folder-storage测试并告诉我您发现了什么。

python manage.py test s3_folder_storage
于 2013-12-04T16:35:30.217 回答