X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..9d45a0c27afb45604b62ffb37fd110a71366c918:/src/polls/models.py?ds=inline diff --git a/src/polls/models.py b/src/polls/models.py index bfc36394b..4b1882df2 100644 --- a/src/polls/models.py +++ b/src/polls/models.py @@ -26,7 +26,7 @@ class Poll(models.Model): raise ValidationError(_('Slug of an open poll needs to be unique')) return super(Poll, self).clean() - def __unicode__(self): + def __str__(self): return self.question[:100] + ' (' + self.slug + ')' def get_absolute_url(self): @@ -50,8 +50,8 @@ class PollItem(models.Model): verbose_name = _('vote item') verbose_name_plural = _('vote items') - def __unicode__(self): - return self.content + ' @ ' + unicode(self.poll) + def __str__(self): + return self.content + ' @ ' + str(self.poll) @property def vote_ratio(self):