BitmaskField implementation for Django ORM
Project description
BitmaskField implementation for Django ORM
Requirements
Python 2.7 or Python 3.4+
Django 1.8+
Example
from django.db import models
from django_bitmask_field import BitmaskField
class MyModel(models.Model):
bitmask = BitmaskField(
choices=[(1, 'bit0'), (2, 'bit1'), (4, 'bit2')], # available choices
default=1 | 4, # bit0 and bit2 are enabled by default
)
Install
pip install django-bitmask-field
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
Built Distribution
Close
Hashes for django-bitmask-field-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063318d46c5a4824c6b62067db38600a1297cd93ee984ef07cd8e8f2ba9c8293 |
|
MD5 | 9dd3f35468d8e061da49ea0940f8c795 |
|
BLAKE2b-256 | 3cfa68adaf1a06ec3efe3d04095caf2ebb854284dcaca2f395be98415e86dae9 |
Close
Hashes for django_bitmask_field-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5de68029eaa2bbb3cac4681f7649cf8c9189e5ecf14b8bdfb01d5012ea9e1b7 |
|
MD5 | b5e91dadf0b7cdef0da1a09bae8eaca3 |
|
BLAKE2b-256 | 759f1ed60f8cab37639b9c3d7a896ed1a82f37f376a90fd0018378179f3a69b7 |