diff options
author | etienne <etienne@07715635-78ed-41b0-aaf1-0afda6c37f35> | 2008-08-21 00:40:10 +0000 |
---|---|---|
committer | etienne <etienne@07715635-78ed-41b0-aaf1-0afda6c37f35> | 2008-08-21 00:40:10 +0000 |
commit | 95c2f32086b98edcdc1121bb936cfdefa1ee33bf (patch) | |
tree | 7d6c78b791ba193f10dc972131d9a97fbd65635a /polls/models.py | |
parent | fad8645171c29359ba9ecfc128dceba545298849 (diff) | |
download | Papillon-95c2f32086b98edcdc1121bb936cfdefa1ee33bf.tar.bz2 Papillon-95c2f32086b98edcdc1121bb936cfdefa1ee33bf.zip |
Implementation of the 3 choices poll
Diffstat (limited to 'polls/models.py')
-rw-r--r-- | polls/models.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/polls/models.py b/polls/models.py index 2abd4ae..f4f1147 100644 --- a/polls/models.py +++ b/polls/models.py @@ -38,10 +38,12 @@ class Poll(models.Model): STATUS = (('A', _('Available')), ('D', _('Disabled')),) status = models.CharField(maxlength=1, choices=STATUS) - TYPE = (('M', _('Meeting')), + """TYPE = (('M', _('Meeting')), ('P', _('Poll')), ('B', _('Balanced poll')), - ('O', _('One choice poll')),) + ('O', _('One choice poll')),)""" + TYPE = (('P', _('Poll')), + ('B', _('Balanced poll')),) type = models.CharField(maxlength=1, choices=TYPE) def getTypeLabel(self): @@ -61,8 +63,7 @@ class Choice(models.Model): class Vote(models.Model): voter = models.ForeignKey(PollUser) choice = models.ForeignKey(Choice) - VOTE = ((-1, _('No')), + VOTE = ((1, _('Yes')), (0, _('Maybe')), - (1, _('Yes')),) - value = models.IntegerField(choices=VOTE) - + (-1, _('No')),) + value = models.IntegerField(choices=VOTE)
\ No newline at end of file |