If there was such a model,
models.py
from django.db import models
class Example(models.Model):
EXAMPLE_FOO = ((1, 'foo1'), (2, 'foo2'))
foo = models.IntegerField(choices=EXAMPLE_FOO)
If you want to get the "name" of the field foo, that is, "foo1" or "foo2", the get_foo_display method is defined without you having to write your own code, so use this.
Don't waste your time creating foo_name properties! (Example: I)
【reference】 http://stackoverflow.com/questions/4320679/django-display-choice-value https://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.get_FOO_display
Recommended Posts