How represent _ _str_ _() from models at HTML?

Hello everyone!
Today I have a problem with _ str _() from models at HTML. Below I attached screen which I think tell much more than any sentence:

Should I leave my solution with PisitiveSmallInteger and use CharField like below?

from django.db import models

class Student(models.Model):
    FRESHMAN = 'FR'
    SOPHOMORE = 'SO'
    JUNIOR = 'JR'
    SENIOR = 'SR'
    GRADUATE = 'GR'
    YEAR_IN_SCHOOL_CHOICES = [
        (FRESHMAN, 'Freshman'),
        (SOPHOMORE, 'Sophomore'),
        (JUNIOR, 'Junior'),
        (SENIOR, 'Senior'),
        (GRADUATE, 'Graduate'),
    ]
    year_in_school = models.CharField(
        max_length=2,
        choices=YEAR_IN_SCHOOL_CHOICES,
        default=FRESHMAN,
    )

Thank a lot for your help! Please remember that I am a beginner :smiley:

Please do not post images of code here. The code can’t be quoted in replies to be commented on. (They’re also not readable on every device.)

From what I can see, you’re using the value of a specific field in your template - that’s not going to call the model’s __str__ function. What you might want to do is create a function for that field to return the string you want printed, and the use that function in the template rather than the field.