Ajout d'un champ 'tirage' aux modèles
This commit is contained in:
parent
9cce1076a9
commit
ac0346d69f
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue