Skip to main content

Configurable file storages for Django

Project description


Django-getstorage is a tiny Python library for dealing with configurable Django storages.

It allows you to define a dictionary of file storage configurations in your settings and refer to them by name in your code.

It should be obsolete once Django ticket 26029 is resolved.


Use the package manager pip to install django-filestorages.

pip install django-filestorages


Wherever you need a storage, use the filestorages.get_storage function.

from filestorages import get_storage

file = models.FileField(storage=get_storage(''))

In your settings, you can define your storages using dotted paths:

    'default': {
        'BACKEND': "",
        'OPTIONS': {
            'location': '/path/to/the/files/',
            'base_url': '/files/',
    'some': {
        'BACKEND': 'other.backend.Storage',
        'OPTIONS': {
            'option': 'value',
    'some.configured': {
        'OPTIONS': {
            'second_option': True,

In this example get_storage('') returns other.backend.Storage(option='value', second_option=True)

If no matching backend is found, FILE_STORAGES['default'] is used, falling back on DEFAULT_FILE_STORAGE if not set.



Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-filestorages, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_filestorages-0.1-py3-none-any.whl (3.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-filestorages-0.1.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page