Skip to main content

A simple Django app to store files in a db.

Project description

Django Simple DB Storage

A very simple app implementing the Django storages API, storing files in a database. A very simple view is provided for downloading files.

Getting Started

  1. Install the django-simpledbstorage pip package
  2. Add the app to your project's INSTALLED_APPS, and urls
  3. Set DEFAULT_FILE_STORAGE to 'simpledbstorage.storage.DatabaseStorage'
  4. Set your MEDIA_URL, if relevant to you

Example

In settings.py:

DEFAULT_FILE_STORAGE = 'simpledbstorage.storage.DatabaseStorage'
INSTALLED_APPS.append('simpledbstorage')
MEDIA_URL = '/{}{}/'.format(BASE_PATH, 'files/')

In urls.py or wherever your URLconf lives:

urlpatterns = [
  url(r'^files/', include('simpledbstorage.urls'))
]

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

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-simpledbstorage-0.1.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

django_simpledbstorage-0.1.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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