Django manage.py collectstatic未上传到谷歌云存储 [英] Django manage.py collectstatic not uploading to google cloud storage
本文介绍了Django manage.py collectstatic未上传到谷歌云存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我第一次部署静态文件和使用Django.
This is my first experience with deploying static files and using Django.
当我运行 python manage.py collectstatic
我将得到以下结果:
2 static files copied to '/home/ymorin007/workspace/sites/onbytes.com/onbytes-static', 151 unmodified, 4 post-processed.
但是没有什么能推动我在Google云存储中的发展.我在终端中没有任何错误.我有什么想念她的吗?
But nothing is beeing push to my bucket in google cloud storage. I'm not getting any errors in the terminal. Anything I'm missing her?
我正在使用 django-storage
这是我的setting.py中的以下定义:
This is the following definition in my setting.py:
STATIC_ROOT = '/home/ymorin007/workspace/sites/onbytes.com/static'
STATIC_URL = 'http://storage.googleapis.com/onbytes-static/'
LIBCLOUD_PROVIDERS = {
'google': {
'type': 'libcloud.storage.types.GOOGLE_STORAGE',
'user': 'XXXXXX',
'key': 'XXXXX',
'bucket': 'onbytes-static',
},
}
DEFAULT_FILE_STORAGE = 'storages.backends.apache_libcloud.LibCloudStorage'
STATICFILES_STORAGE = 'storages.backends.apache_libcloud.LibCloudStorage'
我的要求.txt
...
boto==2.30.0
django-pipeline==1.3.25
django-storages==1.1.8
推荐答案
愚蠢的错误我在与管道链接的setting.py中有另一个定义
Stupid mistake I had another definition in the setting.py linked to Pipeline
STATICFILES_STORAGE ='pipeline.storage.PipelineStorage'
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
这篇关于Django manage.py collectstatic未上传到谷歌云存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文