[Answered ]-Rendering template variables?

2👍

✅

filter returns a list, which is what you are seeing stringified in your rendered template.

Try this instead:

q = Student.objects.filter(pk=1)[0]

Or better yet, since you are selecting by pk (which is unique):

q = Student.objects.get(pk=1)

Leave a comment