"""
>>> states = Enum('OPEN', 'CLOSED')
>>> states.OPEN
0
>>> states.get_choices()
((0, 'OPEN'), (1, 'CLOSED'))
"""
class DjangoEnum(object):
    def __init__(self, *string_list):
        self.__dict__.update([(string, number) for (number, string)
                              in enumerate(string_list)])

    def get_choices(self):
        return tuple(enumerate(self.__dict__.keys()))