~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlpoll/models.py

  • Committer: franku
  • Date: 2019-04-11 15:20:33 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: somal@arcor.de-20190411152033-wtpkgd783vnv2j4b
replaced renamed functions and __unicode__ with __str__

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    def get_absolute_url(self):
38
38
        return reverse('wlpoll_detail', kwargs={'pk': self.id})
39
39
 
40
 
    def __unicode__(self):
 
40
    def __str__(self):
41
41
        return self.name
42
42
 
43
43
 
46
46
    choice = models.CharField(max_length=256)
47
47
    votes = models.PositiveIntegerField(default=0)
48
48
 
49
 
    def __unicode__(self):
 
49
    def __str__(self):
50
50
        return "%i:%s" % (self.votes, self.choice)
51
51
 
52
52