3👍
✅
You need to use the following in your template:
{{ Model1.get_Choice_A_display }}
It will render the string instead of the integer
2👍
You do this with the .get_fieldname_display(…)
method [Django-doc], so here get_Choice_A_display
:
<th>Text</th><th>{{Model1.get_Choice_A_display }}</th>
Note: normally the name of the fields in a Django model are written in snake_case, not PascalCase, so it should be:
choice_a
instead of.Choice_A
Source:stackexchange.com