[Answer]-Django 1.3 list_filter presentation layer – enums

1👍

Use choices

SOME_CHOICES = (
    (0, 'horse'),
    (1, 'cow'),
    (2, 'moses'),
    ...
)

# in model
some_field = models.PositiveIntegerField(choices=SOME_CHOICES)
👤okm

Leave a comment