Nov 11, 2011

Python Enum

class Color(Enum):
    RED = EnumValue('R', 'Red')
    GREEN = EnumValue('G', 'Green')
    BLUE = EnumValue('B', 'Blue')
Where Enum from here django-stdfields models.py

No comments: