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):
    JUNIOR = 'JR'
    SENIOR = 'SR'
        (FRESHMAN, 'Freshman'),
        (SOPHOMORE, 'Sophomore'),
        (JUNIOR, 'Junior'),
        (SENIOR, 'Senior'),
        (GRADUATE, 'Graduate'),
    year_in_school = models.CharField(

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.