Simple enum for Django choice fields
Project description
This app includes DjangoEnum class which compatible with Django choice fields.
Usage example:
from django.db import models
from django_enum import DjangoEnum
class StatusTypes(DjangoEnum):
ACTIVE = 0
STOPPING = 1
STOPPED = 2
class MyModel(models.Model):
status = models.IntegerField(choices=StatusTypes.choices())
CHANGELOG:
1.0.1: Fix name, value issue
Project details
Release history Release notifications | RSS feed
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-enum-simple-choices-1.0.1.tar.gz.
File metadata
- Download URL: django-enum-simple-choices-1.0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c55bf54b632f2179c51a684e2b0dc26fb6cc8ddc2670876f8309e1543a55c83e
|
|
| MD5 |
b77718d8b00f1f638b9caac2182a8dab
|
|
| BLAKE2b-256 |
175f56d7eb3291e83ef14e78576d7095feb8b038b8e4d218271c44ac80862c32
|
File details
Details for the file django_enum_simple_choices-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_enum_simple_choices-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc1f469cb587967f1ca57d72e2956ff54f807556c0efcda9c5f7eb3de19b9adb
|
|
| MD5 |
2c4ad462c0f603fa1452a8ab515e1ddf
|
|
| BLAKE2b-256 |
55cd3796e0651e3de859f7081975d4d6468c83a34324a977abe07bea03faec35
|