I have in my
model.py:
class GendersChoices(models.IntegerChoices):
M = 0, _('Male')
F = 1, _('Female')
N = 2, _('Gender Neutral')
class Address(models.Model):
gender = models.PositiveSmallIntegerField(choices=GendersChoices.choices,
blank=True, default=GendersChoices.F, null=True,verbose_name=_('Gender'))
Now i have a entity from Address and when i make entity.gender i get a
number from database. But i want when in entity are insert 2 then i want to
get _('Gender Neutral') instead of 2
How i can do that?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/53c122e7-0448-4d67-9cd4-ce11ffa2ef5cn%40googlegroups.com.