Skip to content

Extraordinary01/django-enum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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())

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages