Skip to main content
https://img.shields.io/github/actions/workflow/status/amateja/django-bitoptions/python-test.yml https://img.shields.io/coveralls/amateja/django-bitoptions.svg https://img.shields.io/pypi/v/django-bitoptions.svg https://img.shields.io/pypi/format/django-bitoptions.svg https://img.shields.io/pypi/pyversions/django-bitoptions.svg https://img.shields.io/pypi/status/django-bitoptions.svg https://img.shields.io/pypi/l/django-bitoptions.svg

django-bitoptions

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

installation

pip install django-bitoptions

usage

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)

Metadata

Release files for django-bitoptions 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-bitoptions 1.1.1
File Interpreter ABI Platform Actions
django_bitoptions-1.1.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for django_bitoptions-1.1.1-py2.py3-none-any.whl

Release files / django_bitoptions-1.1.1-py2.py3-none-any.whl

Download URL django_bitoptions-1.1.1-py2.py3-none-any.whl
Size 7.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
532d59f4ae1c541226f2e8c252df53bf2dce50b87bb42f6267fd08d34460b17d
BLAKE2b-256 checksum
How to use checksums
d2561ff103e3be48e7be22a1624914898a6434eabf4e85bfee2b76a31bec9101
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0rc1

Security for django-bitoptions 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page