Django storage for qcloud's COS
Django storage for qcloud’s COS
django-storage-qcloud 是一个服务于腾讯云存储的 Django 自定义存储系统。
pip install django-storage-qcloud
或者直接从 git 安装
pip install git+https://github.com/fordguo/django-storage-qcloud.git
git+https://github.com/fordguo/django-storage-qcloud.git
DEFAULT_FILE_STORAGE = 'django_storage_qcloud.storage.QcloudStorage'
STATICFILES_STORAGE = 'django_storage_qcloud.storage.QcloudStorage'
QCLOUD_STORAGE_OPTION = {
'SecretId': 'SecretId 是开发者拥有的项目身份识别 ID,用以身份认证',
'SecretKey': 'SecretKey 是开发者拥有的项目身份密钥。',
'Region': '域名中的地域信息',
'Bucket': '存储桶是 COS 中用于存储数据的容器,每个对象都存储在一个存储桶中',
}
python manage.py collectstatic