Skip to main content

A Dropbox Storage for your Django apps

Project description


A Dropbox Storage for your Django apps


django-dropbox-storage allows Django apps to use Dropbox as a storage backend for file uploading.


First things first:

$ pip install django-dropbox-storage

Then open the of your project and include it to your INSTALLED_APPS:


If you want to use django_dropbox_storage as default storage for all file uploads, you need to adjust DEFAULT_FILE_STORAGE too:


If you just want to use it on a single model field, you can simply import it:

from import DropboxStorage

DROPBOX_STORAGE = DropboxStorage()

photo = models.ImageField(upload_to='photos', storage=DROPBOX_STORAGE ...)

In order to let it work properly, you must set the next settings:


If you don't have DROPBOX_ACCESS_TOKEN you can create one after creating a Dropbox app at Dropbox for Developers. If you have your Dropbox App key and App secret, you can set DROPBOX_CONSUMER_KEY and DROPBOX_CONSUMER_SECRET settings in, then run:

$ python get_dropbox_token [--settings=test_settings]

And follow up on screen instructions, finally set the DROPBOX_ACCESS_TOKEN_SECRET in your module.

You can also set default root folder setting the value of DROPBOX_ROOT_FOLDER:


By default it's set to '/' (root folder).


Tests are written following Django's best practices.

In order to run them, you need to set DROPBOX_ACCESS_TOKEN properly.

NOTE: if you're testing this package as stand-alone, you can set the access token in a module put in the root folder.

To launch the test suite:

$ python test [--settings=test_settings]

To check the unit tests coverage you can:

$ pip install coverage
$ coverage run test [--settings=test_settings]
$ coverage report -m


When contributing, please follow these steps:

  • Clone the repo and make your changes.
  • Make sure your code has test cases written against it.
  • Make sure all the tests pass.
  • Lint your code with Flake8.
  • Add your name to the list of contributers.
  • Submit a Pull Request.


  • Emanuele Bertoldi

This project is based on previous work by:

Kudos and many thanks to all of them!


Copyright (c) 2018 Emanuele Bertoldi

MIT License

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-dropbox-storage-fork-0.4.2.tar.gz (8.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

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