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
File details
Details for the file django-bitmask-field-0.1.3.tar.gz
.
File metadata
- Download URL: django-bitmask-field-0.1.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 063318d46c5a4824c6b62067db38600a1297cd93ee984ef07cd8e8f2ba9c8293 |
|
MD5 | 9dd3f35468d8e061da49ea0940f8c795 |
|
BLAKE2b-256 | 3cfa68adaf1a06ec3efe3d04095caf2ebb854284dcaca2f395be98415e86dae9 |
File details
Details for the file django_bitmask_field-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: django_bitmask_field-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5de68029eaa2bbb3cac4681f7649cf8c9189e5ecf14b8bdfb01d5012ea9e1b7 |
|
MD5 | b5e91dadf0b7cdef0da1a09bae8eaca3 |
|
BLAKE2b-256 | 759f1ed60f8cab37639b9c3d7a896ed1a82f37f376a90fd0018378179f3a69b7 |