Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-enum-simple-choices-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-enum-simple-choices-1.0.0.tar.gz.

File metadata

File hashes

Hashes for django-enum-simple-choices-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6b423077ca459f477d753341c6d9b7fd9d745548c8be07d2c5001b0d7a749fae
MD5 5881c73858e9123d77f2b00415a596da
BLAKE2b-256 c1a8c8ce514ddc1a1c1c8220a1c2cf3ef15afc19ec06e5b78a29f567bf5bd940

See more details on using hashes here.

File details

Details for the file django_enum_simple_choices-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_enum_simple_choices-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88ef09b3f66d3f18e65e4a4db5463097e17ba8d816faad4199867681ab23452c
MD5 da1f712663929c1e5f6056c56e11cb3c
BLAKE2b-256 0fa3d897b91dbcd1bd7a0a701d210a74bce54feee84975c90c49392d043f058f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page