When you have a model field with a choices option you tend to have some magic values associated with human readable names. Is there in Django a convenient way to set these f
Do as seen here. Then you can use a word that represents the proper integer.
Like so:
LOW = 0 NORMAL = 1 HIGH = 2 STATUS_CHOICES = ( (LOW, 'Low'), (NORMAL, 'Normal'), (HIGH, 'High'), )
Then they are still integers in the DB.
Usage would be thing.priority = Thing.NORMAL
thing.priority = Thing.NORMAL