1👍
✅
Use choices
SOME_CHOICES = (
(0, 'horse'),
(1, 'cow'),
(2, 'moses'),
...
)
# in model
some_field = models.PositiveIntegerField(choices=SOME_CHOICES)
👤okm
Source:stackexchange.com