From ac0346d69f329a29f367f290f1a630a37aaff695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Tue, 31 May 2016 20:04:27 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20champ=20'tirage'=20aux=20mod?= =?UTF-8?q?=C3=A8les?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bda/models.py b/bda/models.py index 11c9dd3b..cd013d0e 100644 --- a/bda/models.py +++ b/bda/models.py @@ -23,6 +23,7 @@ class Spectacle (models.Model): price = models.FloatField("Prix d'une place", blank = True) slots = models.IntegerField ("Places") priority = models.IntegerField ("Priorité", default = 1000) + tirage = models.IntegerField ("Tirage") class Meta: verbose_name = "Spectacle" @@ -68,6 +69,7 @@ class ChoixSpectacle (models.Model): spectacle = models.ForeignKey(Spectacle, related_name = "participants") priority = models.PositiveIntegerField("Priorité") double_choice = models.CharField("Nombre de places", default = "1", choices = DOUBLE_CHOICES, max_length = 10) + tirage = models.IntegerField("Tirage") def get_double(self): return self.double_choice != "1" @@ -87,6 +89,7 @@ class Attribution (models.Model): participant = models.ForeignKey(Participant) spectacle = models.ForeignKey(Spectacle, related_name = "attribues") given = models.BooleanField(u"Donnée", default = False) + tirage = models.IntegerField("Tirage") def __unicode__ (self): return u"%s -- %s" % (self.participant, self.spectacle)