This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Database storage for Django files

Project Description
# Database storage for Django
This package implements the Django Storage API to store any file in any database supported by Django. In many cases it is a bad idea to store files in database because performance can degrade rapidly.

## Requirements
* Python 2.7, 3+
* Django 1.7+

## Installation
1. Install using pip:

```bash
pip install django-dbase-storage
```

2. Add to INSTALLED_APPS:

```python
INSTALLED_APPS = (
...
'dbfile',
)
```

3. Run migrations to create table to store files

```
python manage.py migrate dbfile
```

Now you can set default storage for the whole project in settings:

```python
DEFAULT_FILE_STORAGE = 'dbfile.storage.DatabaseStorage'
```

or specify it for certain fields of your models:

```python
class UserFiles(models.Model):
file = FileField(storage=DatabaseStorage())
```


##Known issues
DatabaseStorage fails to store file if debug-toolbar is enabled. Debug-toolbar converts binary to UTF-8 somewhere
Release History

Release History

This version
History Node

0.1.1

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-dbase-storage-0.1.1.tar.gz (3.9 kB) Copy SHA256 Checksum SHA256 Source Apr 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting