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.2.tar.gz
(14.6 kB
view hashes)
Built Distribution
Close
Hashes for django-bitmask-field-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61aa5b43a7f551d8487474843c1e0ce585357b363202afd083900567ed7bd676 |
|
MD5 | 78a97ffbdeff6122e43a431ce03f5205 |
|
BLAKE2b-256 | e84c29f5c7c85e7396e6e9322f270f9720049d9879a938dc099be836d5d3157d |
Close
Hashes for django_bitmask_field-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3fdd591f8f0866e8eeaee57e242a0234848f4c5c118d87a60f5d4f683877292 |
|
MD5 | f98e29e96d45eb2ee55954adeeaf7e9a |
|
BLAKE2b-256 | 012acfcbf9ffaebd3489fcac1dc19fe23f8bd7c0cc72912127b63cbc0dee4d52 |