Python中文
首页
教程
问答
标签
搜索
登录
注册
找不到DjangPipeline amazon s3 collectstatic文件
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我使用的是s3boto、django pipeline和django storages,设置如下:</p> <pre><code>DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' STATICFILES_STORAGE = 'utils.classutils.S3PipelineStorage' MEDIA_ROOT = "/" MEDIA_URL = '//s3.amazonaws.com/%s/' % AWS_STORAGE_BUCKET_NAME STATIC_ROOT = '/static/' STATIC_URL = '//s3.amazonaws.com/%s/static/' % AWS_STORAGE_BUCKET_NAME STATICFILES_DIRS = ( os.path.join(SITE_ROOT, 'assets'), ) </code></pre> <p>以及django管道的定制存储</p> ^{pr2}$ <p>但我一直得到:</p> <pre><code>ValueError: The file 'project/head.png' could not be found with <utils.classutils.S3PipelineStorage object at 0x2163510>. </code></pre> <p>但是这个文件在任何地方都不存在!不是在插件中,我试着找到它,我检查了我的静态目录,尝试在管理中找到它,我甚至不记得使用这样一个文件!我试过findstatic,但找不到文件。在</p> <p>我能错过什么?在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>当然有一个css文件指向一个不存在的<code>'project/head.png'</code>文件,删除这个引用,它应该可以工作。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
无法使用Django/mongoengine连接到MongoDB(身份验证失败)
10 回答
无法使用Django\u mssql\u后端迁移到外部hos
3 回答
无法使用Django&Python3.4连接到MySql
2 回答
无法使用Django+nginx上载媒体文件
7 回答
无法使用Django1.6导入名称模式
10 回答
无法使用Django1.7和mongodb登录管理站点
4 回答
无法使用Djangoadmin创建项目,进程使用了错误的路径,因为我事先安装了错误的Python
10 回答
无法使用Djangockedi验证CBV中的字段
6 回答
无法使用Djangocketditor上载图像(错误400)
10 回答
无法使用Djangocron进行函数调用
10 回答
无法使用Djangofiler djang上载文件
6 回答
无法使用Djangokronos
10 回答
无法使用Djangomssql provid
8 回答
无法使用Djangomssql连接到带有Django 1.11的MS SQL Server 2016
8 回答
无法使用Djangomssq迁移Django数据库
10 回答
无法使用Djangonox创建用户
5 回答
无法使用Djangopyodb从Django查询SQL Server
2 回答
无法使用Djangopython3ldap连接到ldap
7 回答
无法使用Djangoredis连接到redis
4 回答
无法使用Django中的FK创建新表
7 回答