forked from DGNum/gestioCOF
PEP8: fixed ' = ' → '=' on parameters
'unexpected spaces around keyword / parameter equals'
This commit is contained in:
parent
7de11f2285
commit
c7a3656ded
18 changed files with 496 additions and 379 deletions
|
@ -18,12 +18,12 @@ class Tirage(models.Model):
|
|||
|
||||
def __unicode__(self):
|
||||
return u"%s - %s" % (self.title, self.date_no_seconds())
|
||||
|
||||
|
||||
class Salle(models.Model):
|
||||
name = models.CharField("Nom", max_length = 300)
|
||||
name = models.CharField("Nom", max_length=300)
|
||||
address = models.TextField("Adresse")
|
||||
|
||||
def __unicode__ (self):
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
class Spectacle(models.Model):
|
||||
|
@ -39,9 +39,9 @@ class Spectacle(models.Model):
|
|||
|
||||
class Meta:
|
||||
verbose_name = "Spectacle"
|
||||
ordering = ("priority", "date","title",)
|
||||
ordering = ("priority", "date", "title",)
|
||||
|
||||
def __repr__ (self):
|
||||
def __repr__(self):
|
||||
return u"[%s]" % self.__unicode__()
|
||||
|
||||
def timestamp(self):
|
||||
|
@ -50,15 +50,15 @@ class Spectacle(models.Model):
|
|||
def date_no_seconds(self):
|
||||
return self.date.strftime('%d %b %Y %H:%M')
|
||||
|
||||
def __unicode__ (self):
|
||||
def __unicode__(self):
|
||||
return u"%s - %s, %s, %.02f€" % (self.title, self.date_no_seconds(),
|
||||
self.location, self.price)
|
||||
|
||||
PAYMENT_TYPES = (
|
||||
("cash",u"Cash"),
|
||||
("cb","CB"),
|
||||
("cheque",u"Chèque"),
|
||||
("autre",u"Autre"),
|
||||
("cash", u"Cash"),
|
||||
("cb", "CB"),
|
||||
("cheque", u"Chèque"),
|
||||
("autre", u"Autre"),
|
||||
)
|
||||
|
||||
class Participant(models.Model):
|
||||
|
@ -69,12 +69,12 @@ class Participant(models.Model):
|
|||
attributions = models.ManyToManyField(Spectacle,
|
||||
through="Attribution",
|
||||
related_name="attributed_to")
|
||||
paid = models.BooleanField (u"A payé", default=False)
|
||||
paid = models.BooleanField(u"A payé", default=False)
|
||||
paymenttype = models.CharField(u"Moyen de paiement",
|
||||
max_length=6, choices=PAYMENT_TYPES, blank=True)
|
||||
tirage = models.ForeignKey(Tirage)
|
||||
|
||||
def __unicode__ (self):
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s" % (self.user)
|
||||
|
||||
DOUBLE_CHOICES = (
|
||||
|
@ -109,6 +109,5 @@ class Attribution(models.Model):
|
|||
spectacle = models.ForeignKey(Spectacle, related_name="attribues")
|
||||
given = models.BooleanField(u"Donnée", default=False)
|
||||
|
||||
def __unicode__ (self):
|
||||
def __unicode__(self):
|
||||
return u"%s -- %s" % (self.participant, self.spectacle)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue