This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A generic app to provide a way to handle database binary data in django.

Introduction

This is a total rip-off of BinaryField class from Django 1.6+ sourcecode with some tweaks to make it work under Django 1.4+.

Installation

pip install django-binaryfield

Usage

Use BinaryField to bind your binary database columns on a django model. Like so:

from binaryfield import BinaryField

class ExampleModel(models.Model):

    short_data = BinaryField(max_length=10, default=b'\x08')
    data = BinaryField()

Configuration

syncdb

Django-binaryfield works out-of-the-box with existing binary database columns that are correctly mapped in your models. If you want BinaryField to work with syncdb management command there’s one setting called BINARYFIELD_HACK_ENGINES that can be used to hack Django database backend. Use it like this:

BINARYFIELD_HACK_ENGINES = (
    'django.db.backends.sqlite3',
)

It’s a list of django backends (as an “importable” strings) to mangle in order to syncdb could work properly. Did I mention that it is a hack?

Oracle issues

There are some issues with Oracle when handling parameteres in a query in Django < 1.6. You can see this link (https://github.com/django/django/commit/8aefd30379eba9aa7e5afcc69cc352adf0d23489) to see what changed in django.db.backends.oracle.base.OracleParam class regarding this feature.

There are two settings to control a fix to this issue:

  • BINARYFIELD_HACK_ORACLE_PARAM - determines whether or not apply the fix - Default: False
  • BINARYFIELD_HACK_ORACLE_PARAM_BACKENDS - an iterable of backend engines as an “importable” strings to apply the fix. - Default: [ settings.DATABASES['default']['ENGINE'] ]

TODO

  • Some more tests maybe?
  • An example view to show how to serve a file from database
Release History

Release History

0.4.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_binaryfield-0.4.0-py2.py3-none-any.whl (7.3 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Feb 18, 2014
django-binaryfield-0.4.0.tar.gz (5.8 kB) Copy SHA256 Checksum SHA256 Source Feb 18, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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