Skip to main content

qiniu file(image) upload helper utils

Project description

qiniu file(image) upload helper utils for Django

Requirements

those packages will auto install when install django_qiniu.

Install

pip install django-qiniu

Config

  1. add account_helper.middleware.CurrentUserMiddleware in MIDDLEWARE_CLASSES

  2. set qiniu config follow qiniu-storage document Configurations.

  3. edit settings.py.

DEFAULT_FILE_STORAGE = 'django_qiniu.backends.QiniuStorage'

QINIU_PREVIEW_EXPIRE = 300         # 300 seconds,default is 3600 if not set

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


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.3.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file django-qiniu-0.1.3.tar.gz.

File metadata

  • Download URL: django-qiniu-0.1.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for django-qiniu-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1f1e1afd7ef98b4e34e601bd9e3b66f5d5af67e92b493eb9e696bd28b7bd5b21
MD5 e0e5d8b1163b1834c62976ce494f8542
BLAKE2b-256 9b324b0f6de3048daef10468762321d60d98ac15b9e0af3ed6e131ccc4dd42e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page