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
)
Admin site:
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
django-bitmask-field-0.1.1.tar.gz
(14.6 kB
view hashes)
Close
Hashes for django-bitmask-field-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d1ec0deafa57e7d823bd08567c42cf0497e7b6235c35e7a0be0c9258d49ea8e |
|
MD5 | 70236f33bacb1466ba70b69cf51c4bbd |
|
BLAKE2b-256 | db244333433c5c026d704d3ce6ecb4f0c25ff01cdf09e4d5f635df12c6469296 |