[Django]-How to display the label from models.TextChoices in the template?

5👍

You’d use get_{field_name}_display

Python
modelObj.get_model_choice_display()
Template
{{modelObj.get_model_choice_display}}

Leave a comment