django qiniu filed
Project description
qiniu file(image) upload helper utils
Requirements
those packages will auto install when install django_qiniu.
Install
pip install django_qiniu
Config
set qiniu config follow qiniu-storage document Configurations <https://github.com/glasslion/django-qiniu-storage/blob/master/README.md#Configurations>.
edit settings.py.
DEFAULT_FILE_STORAGE = 'django_qiniu.backends.QiniuStorage'
QINIU_PREVIEW_EXPIRE = 300 # 300 seconds,default is 3600 if not set
add account_helper.middleware.CurrentUserMiddleware in MIDDLEWARE_CLASSES
How to use
edit your models file.
from django_qiniu.utils import user_upload_dir
# ...fields definition...
pic_00 = models.ImageField('picture 00', upload_to=user_upload_dir, blank=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-qiniu-0.1.0.tar.gz
(2.2 kB
view hashes)