Simple enum which with Django char 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())
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
File details
Details for the file django-enum-simple-choices-1.0.0.tar.gz
.
File metadata
- Download URL: django-enum-simple-choices-1.0.0.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 | 6b423077ca459f477d753341c6d9b7fd9d745548c8be07d2c5001b0d7a749fae |
|
MD5 | 5881c73858e9123d77f2b00415a596da |
|
BLAKE2b-256 | c1a8c8ce514ddc1a1c1c8220a1c2cf3ef15afc19ec06e5b78a29f567bf5bd940 |
File details
Details for the file django_enum_simple_choices-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: django_enum_simple_choices-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 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 | 88ef09b3f66d3f18e65e4a4db5463097e17ba8d816faad4199867681ab23452c |
|
MD5 | da1f712663929c1e5f6056c56e11cb3c |
|
BLAKE2b-256 | 0fa3d897b91dbcd1bd7a0a701d210a74bce54feee84975c90c49392d043f058f |