[Answered ]-Django: Display choice value not showing

2👍

You haven’t told the model field to use the choices – so get_month_display won’t even be defined.

Also, I don’t understand why you have defined the field to be a char field of length 120: it should be an integer field, as that is what your values are.

month = models.IntegerField(choices=MONTH_CHOICES, null=False, blank=False)

0👍

You have set choices in form field but trying get it from model field. And why don’t you use modelforms https://docs.djangoproject.com/en/dev/topics/forms/modelforms/

Leave a comment