An IntEnumField for Django
Project description
Django IntEnumField
An IntEnumField for Django.
Features
- Store your multiple-choice options as a smallint (2 bytes) instead of varchar
- Reuse existing IntEnums as choice values
- Integrates well with Django's admin app (display and filter)
Requirements
- Python 3.8+
- Django 2.2+
Usage
from enum import IntEnum
from django.db import models
from django_intenum import IntEnumField
class Status(IntEnum):
UNKNOWN = 0
IN_PROGRESS = 1
COMPLETED = 2
ERROR = 3
class Job(models.Model):
status = IntEnumField(enum=Status)
License
This project is licensed under the MIT license. The full license text is available in the LICENSE file.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_intenumfield-2.0.0.tar.gz.
File metadata
- Download URL: django_intenumfield-2.0.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6918100be3411c1d5f1dcc4c3d126149f45ab015d1352bbe9c1cb677673198c
|
|
| MD5 |
caf366564ddfe2f15743a3fadcaaf24c
|
|
| BLAKE2b-256 |
d308eb071f06a4b419b952baffd231d14e0e667b5954bc0a87c768d877ca4ba0
|
Provenance
The following attestation bundles were made for django_intenumfield-2.0.0.tar.gz:
Publisher:
ci.yml on HearthSim/django-intenumfield
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_intenumfield-2.0.0.tar.gz -
Subject digest:
c6918100be3411c1d5f1dcc4c3d126149f45ab015d1352bbe9c1cb677673198c - Sigstore transparency entry: 160124400
- Sigstore integration time:
-
Permalink:
HearthSim/django-intenumfield@c89a929eccdc86d2be30d29c5375d59e6dcdede3 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/HearthSim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c89a929eccdc86d2be30d29c5375d59e6dcdede3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_intenumfield-2.0.0-py3-none-any.whl.
File metadata
- Download URL: django_intenumfield-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fdb4fb9852d5a3e8862668d68a5452177d6dd15e1529505481c7569f9984121
|
|
| MD5 |
a869c5ba925e18f328e2d49461bcef6e
|
|
| BLAKE2b-256 |
efcd5275510dff175572eada314e4f2af3cb86d0d1ddb74f5aab28ba785e7196
|
Provenance
The following attestation bundles were made for django_intenumfield-2.0.0-py3-none-any.whl:
Publisher:
ci.yml on HearthSim/django-intenumfield
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_intenumfield-2.0.0-py3-none-any.whl -
Subject digest:
9fdb4fb9852d5a3e8862668d68a5452177d6dd15e1529505481c7569f9984121 - Sigstore transparency entry: 160124401
- Sigstore integration time:
-
Permalink:
HearthSim/django-intenumfield@c89a929eccdc86d2be30d29c5375d59e6dcdede3 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/HearthSim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c89a929eccdc86d2be30d29c5375d59e6dcdede3 -
Trigger Event:
push
-
Statement type: