1👍
✅
Watch the Dunder
!
The method should be called __unicode__()
, not _unicode_()
:
class Poll(models.Poll)
def __unicode__(self)
return(self.question)
Source:stackexchange.com