X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..e180be7cce99d59054b206a061386188c5652f02:/src/polls/models.py 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):