diff --git a/README.md b/README.md index 910e14a..7ad560a 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ git+https://github.com/fordguo/django-storage-qcloud.git - 配置 setting.py: - 将上传文件存放到云 - `DEFAULT_FILE_STORAGE = 'django_storage.qcloud.QcloudStorage'` + `DEFAULT_FILE_STORAGE = 'django_storage_qcloud.storage.QcloudStorage'` - 将静态文件存放到云 - `STATICFILES_STORAGE = 'django_storage.qcloud.QcloudStorage'` + `STATICFILES_STORAGE = 'django_storage_qcloud.storage.QcloudStorage'` - 替换 SecretId, SecretKey, Region, Bucket 的值 ``` QCLOUD_STORAGE_OPTION = { diff --git a/django_storage/__init__.py b/django_storage_qcloud/__init__.py similarity index 100% rename from django_storage/__init__.py rename to django_storage_qcloud/__init__.py diff --git a/django_storage/qcloud.py b/django_storage_qcloud/storage.py similarity index 97% rename from django_storage/qcloud.py rename to django_storage_qcloud/storage.py index f458b5e..3e87b0e 100644 --- a/django_storage/qcloud.py +++ b/django_storage_qcloud/storage.py @@ -54,7 +54,7 @@ def url(self, name): if getattr(settings, 'COS_URL', ''): url = "{}/{}".format(settings.COS_URL, name) - elif getattr(settings, 'COS_USE_CDN', False): + elif getattr(settings, 'COS_FAST_CDN', False): url = "https://{}.file.myqcloud.com/{}".format( self.bucket, name) else: diff --git a/setup.py b/setup.py index 4643210..a925f3b 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ AUTHOR = "Ford" AUTHOR_EMAIL = "agile.guo@gmail.com" URL = "https://github.com/fordguo/django-storage-qcloud" -VERSION = '0.1.3' +VERSION = '0.2.0' setup( name=NAME,