[Fixed]-__unicode__() method doesn't work well

1👍

You had this display is because you use filter to get farsi, which gives you the result of a queryset. If you print queryset it looks like a list with [] around it. What you need is get:

farsi = POstan.objects.filter(shortname = os)

This would give you a single object and {{ farsi }} would only refer to __unicode__ of a single object.

Leave a comment