Metadata-Version: 2.0
Name: django-bitoptions
Version: 1.0.1
Summary: This project replaces several related BooleanFields with asingle field and a few eye candy features.
Home-page: https://github.com/amateja/django-bitoptions
Author: Andrzej Mateja
Author-email: mateja.and@gmail.com
License: Public Domain
Keywords: django bit options bitoptions
Platform: Posix; MacOS X; Windows
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django :: 1.8
Classifier: Framework :: Django :: 1.9
Classifier: Intended Audience :: Developers
Classifier: License :: Public Domain
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Requires-Dist: django (>=1.8)

.. image:: https://img.shields.io/travis/amateja/django-bitoptions.svg
    :target: https://travis-ci.org/amateja/django-bitoptions
.. image:: https://img.shields.io/coveralls/amateja/django-bitoptions.svg
    :target: https://coveralls.io/github/amateja/django-bitoptions
.. image:: https://www.quantifiedcode.com/api/v1/project/9d2810191a234414a3edf7843f5d1c1c/badge.svg
    :target: https://www.quantifiedcode.com/app/project/9d2810191a234414a3edf7843f5d1c1c
.. image:: https://img.shields.io/pypi/v/django-bitoptions.svg
    :target: https://pypi.python.org/pypi/django-bitoptions
.. image:: https://img.shields.io/pypi/format/django-bitoptions.svg
    :target: https://pypi.python.org/pypi/django-bitoptions
.. image:: https://img.shields.io/pypi/pyversions/django-bitoptions.svg
    :target: https://pypi.python.org/pypi/django-bitoptions
.. image:: https://img.shields.io/pypi/status/django-bitoptions.svg
    :target: https://pypi.python.org/pypi/django-bitoptions
.. image:: https://img.shields.io/pypi/l/django-bitoptions.svg
    :target: https://pypi.python.org/pypi/django-bitoptions

=================
django-bitoptions
=================

This project replaces several related BooleanFields with a single field and
a few eye candy features.

installation
============

::

    pip install django-bitoptions

usage
=====

.. code-block:: python

    from django.db import models
    from bitoptions import BitOptions, BitOptionsField

    TOPPINGS = BitOptions(
        ('pepperoni', 'mushrooms', 'onions', 'sausage', 'bacon',
         'black olives', 'green olives', 'green peppers', 'pineapple',
         'spinach', 'tomatoes', 'broccoli', 'jalapeno peppers', 'anchovies',
         'chicken', 'beef', 'ham', 'salami')
    )
    CHEESES = BitOptions(('feta', 'parmesan', 'provolone', 'goat',
                          'mozzarella'))


    class Pizza(models.Model):
        toppings = BitOptionsField(options=TOPPINGS)
        cheeses = BitOptionsField(options=CHEESES)


