All Projects → aliyun → Django Oss Storage

aliyun / Django Oss Storage

Licence: mit
Django storage backends for AliCloud OSS.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Django Oss Storage

Django Apps Checklist
Useful checklist for build great Django apps. Feel free to contribute!
Stars: ✭ 98 (-4.85%)
Mutual labels:  django
Awx
AWX Project
Stars: ✭ 10,469 (+10064.08%)
Mutual labels:  django
Wq.db
☁🌐 wq's db library, extending Django REST framework to support apps for geospatial field data collection, citizen science, and crowdsourcing.
Stars: ✭ 101 (-1.94%)
Mutual labels:  django
Wjcat Release
问卷喵——vue和django开发的问卷调查网站。
Stars: ✭ 99 (-3.88%)
Mutual labels:  django
Osm Export Tool
Web service to download customised OSM data in various file formats
Stars: ✭ 99 (-3.88%)
Mutual labels:  django
Django Tables2
django-tables2 - An app for creating HTML tables
Stars: ✭ 1,360 (+1220.39%)
Mutual labels:  django
Pootle
Online translation tool
Stars: ✭ 1,346 (+1206.8%)
Mutual labels:  django
Hexopress
A tiny blogging platform that lets you write posts in Google Docs and syncs with a Google Drive directory.
Stars: ✭ 102 (-0.97%)
Mutual labels:  django
Django Rq
A simple app that provides django integration for RQ (Redis Queue)
Stars: ✭ 1,361 (+1221.36%)
Mutual labels:  django
Wger
Self hosted FLOSS fitness/workout, nutrition and weight tracker written with Django
Stars: ✭ 1,372 (+1232.04%)
Mutual labels:  django
Amolicloud
AmoliCloud,简称Amoli私有云,一款轻量级的私有云存储系统,支持本地、阿里云OSS、腾讯云COS做为存储方式,提供简单的文件列表、上传下载、文件分享、文件管理等功能。
Stars: ✭ 99 (-3.88%)
Mutual labels:  oss
Drf Cheat Sheet
Cheat sheet / quick reference guide for Django REST Framework.
Stars: ✭ 99 (-3.88%)
Mutual labels:  django
Django Project Template
Django project layout to quickly start build fantastic websites! (included npm, libsass, frontend setup and base Django apps)
Stars: ✭ 100 (-2.91%)
Mutual labels:  django
Django Th
🐍 Trigger Happy - The bus 🚌 for your internet services
Stars: ✭ 1,356 (+1216.5%)
Mutual labels:  django
Awesome Open Source By Country Or Region
Lists of open source projects mainly made by devs of a country or region.
Stars: ✭ 102 (-0.97%)
Mutual labels:  oss
Kaizen Openapi Editor
Eclipse Editor for the Swagger-OpenAPI Description Language
Stars: ✭ 97 (-5.83%)
Mutual labels:  oss
Circleci Demo Python Django
Example Django application running on CircleCI
Stars: ✭ 100 (-2.91%)
Mutual labels:  django
Django Filer
File and Image Management Application for django
Stars: ✭ 1,384 (+1243.69%)
Mutual labels:  django
Django Cacheops
A slick ORM cache with automatic granular event-driven invalidation.
Stars: ✭ 1,379 (+1238.83%)
Mutual labels:  django
Covid19 Dashboard
🦠 Django + Plotly Coronavirus dashboard. Powerful data driven Python web-app, with an awesome UI. Contributions welcomed! Featured on 🕶Awesome-list
Stars: ✭ 100 (-2.91%)
Mutual labels:  django

Django AliCloud OSS Storage

django-oss-storage provides a Django AliCloud OSS file storage.

Features

  • Django file storage for AliCloud OSS
  • Django static file storage for AliCloud OSS
  • Works in Python 2 & 3

Installation

  • Install

.. code-block:: bash

$ pip install django-oss-storage
  • Add 'django_oss_storage' to your INSTALLED_APPS setting
  • Set your DEFAULT_FILE_STORAGE setting to "django_oss_storage.backends.OssMediaStorage"
  • Set your STATICFILES_STORAGE setting to "django_oss_storage.backends.OssStaticStorage"
  • Configure your AliCloud OSS settings (Refer below).

Use the following settings for file storage.

.. code-block:: bash

STATICFILES_STORAGE = 'django_oss_storage.backends.OssStaticStorage'

DEFAULT_FILE_STORAGE = 'django_oss_storage.backends.OssMediaStorage'

Authentication settings

Use the following settings to authenticate with AliCloud OSS.

.. code-block:: bash

# AliCloud access key ID
OSS_ACCESS_KEY_ID = <Your Access Key ID>

# AliCloud access key secret
OSS_ACCESS_KEY_SECRET = <Your Access Key Secret>

Storage settings

For public or public-read buckets, storage urls will be bucket_name.endpoint/key format

For private buckets, storage urls will be signed url. The expires time can be set by OSS_EXPIRE_TIME as environment variable or as Django settings. The default value for OSS_EXPIRE_TIME is 30 days.

.. code-block:: bash

OSS_EXPIRE_TIME = <Expire Time in Seconds>

File storage settings

Use the following settings to configure AliCloud OSS file storage.

.. code-block:: bash

# The name of the bucket to store files in
OSS_BUCKET_NAME = <Your bucket name>

# The URL of AliCloud OSS endpoint
# Refer https://www.alibabacloud.com/help/zh/doc-detail/31837.htm for OSS Region & Endpoint
OSS_ENDPOINT = <Your access endpoint>

# The default location for your files
MEDIA_URL = '/media/'

Staticfiles storage settings

All of the file storage settings are available for the staticfiles storage.

.. code-block:: bash

# The default location for your static files
STATIC_URL = '/static/'

staticfiles provides command 'collectstatic'. Run following command to collect all sub-folder 'static' of each app and upload to STATIC_URL.

.. code-block:: bash

$ python manage.py collectstatic

Testing

First set the required AccessKeyId, AccessKeySecret, endpoint and bucket information for the test through environment variables (Do not use the bucket for the production environment). Take the Linux system for example:

.. code-block:: bash

$ export OSS_ACCESS_KEY_ID=<AccessKeyId>
$ export OSS_ACCESS_KEY_SECRET=<AccessKeySecret>
$ export OSS_BUCKET_NAME=<bucket>
$ export OSS_ENDPOINT=<endpoint>

Support and announcements

Downloads and bug tracking can be found at the main project website <http://github.com/aliyun/django-oss-storage>_.

License

  • MIT <https://github.com/aliyun/django-oss-storage/blob/master/LICENSE>_.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].