GithubHelp home page GithubHelp logo

rankor / django-storages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajay340/django-storages

0.0 0.0 0.0 1.66 MB

https://django-storages.readthedocs.io/

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

django-storages's Introduction

Django-Storages

PyPI Version

Build Status

Installation

Installing from PyPI is as easy as doing:

pip install django-storages

If you'd prefer to install from source (maybe there is a bugfix in master that hasn't been released yet) then the magic incantation you are looking for is:

pip install -e 'git+https://github.com/jschneier/django-storages.git#egg=django-storages'

Once that is done set DEFAULT_FILE_STORAGE to the backend of your choice. If, for example, you want to use the boto3 backend you would set:

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'

If you are using the FileSystemStorage as your storage management class in your models FileField fields, remove them and don't specify any storage parameter. That way, the DEFAULT_FILE_STORAGE class will be used by default in your field. For example, if you have a photo field defined as:

photo = models.FileField(
    storage=FileSystemStorage(location=settings.MEDIA_ROOT),
    upload_to='photos',
)

Set it to just:

photo = models.FileField(
    upload_to='photos',
)

There are also a number of settings available to control how each storage backend functions, please consult the documentation for a comprehensive list.

About

django-storages is a project to provide a variety of storage backends in a single library.

This library is usually compatible with the currently supported versions of Django. Check the Trove classifiers in setup.py to be sure.

django-storages is backed in part by Tidelift. Check them out for all of your enterprise open source software commerical support needs.

Security

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure. Please do not post a public issue on the tracker.

History

This repo began as a fork of the original library under the package name of django-storages-redux and became the official successor (releasing under django-storages on PyPI) in February of 2016.

Found a Bug? Something Unsupported?

I suspect that a few of the storage engines in backends/ have been unsupported for quite a long time. I personally only really need the S3Storage backend but welcome bug reports (and especially) patches and tests for some of the other backends.

Issues are tracked via GitHub issues at the project issue page.

Documentation

Documentation for django-storages is located at https://django-storages.readthedocs.io/.

Contributing

  1. Check for open issues at the project issue page or open a new issue to start a discussion about a feature or bug.
  2. Fork the django-storages repository on GitHub to start making changes.
  3. Add a test case to show that the bug is fixed or the feature is implemented correctly.
  4. Bug me until I can merge your pull request. Also, don't forget to add yourself to AUTHORS.

django-storages's People

Contributors

alexcwatt avatar bxm156 avatar comandrei avatar davidbgk avatar dimbleby avatar erlingbo avatar fhahn avatar freakboy3742 avatar gvangool avatar ianlewis avatar jdufresne avatar jezdez avatar jschneier avatar kaedroho avatar key avatar martey avatar maryokhin avatar mattbriancon avatar mattrobenolt avatar nikolas avatar rankor avatar richleland avatar scjody avatar skirsdeda avatar smileychris avatar sww314 avatar thenewguy avatar tobiasmcnulty avatar zuck avatar zulupro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.