From 1b82b2300a112c472758807ea709cc3f93769f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Sun, 8 Jan 2017 20:26:02 +0100 Subject: [PATCH] Typo et suppression de la py2 compat --- bda/models.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bda/models.py b/bda/models.py index d1d4c2fd..f9087ac1 100644 --- a/bda/models.py +++ b/bda/models.py @@ -11,10 +11,8 @@ from django.template import loader from django.core import mail from django.conf import settings from django.utils import timezone, formats -from django.utils.encoding import python_2_unicode_compatible -@python_2_unicode_compatible class Tirage(models.Model): title = models.CharField("Titre", max_length=300) ouverture = models.DateTimeField("Date et heure d'ouverture du tirage") @@ -29,7 +27,6 @@ class Tirage(models.Model): timezone.template_localtime(self.fermeture))) -@python_2_unicode_compatible class Salle(models.Model): name = models.CharField("Nom", max_length=300) address = models.TextField("Adresse") @@ -38,7 +35,6 @@ class Salle(models.Model): return self.name -@python_2_unicode_compatible class CategorieSpectacle(models.Model): name = models.CharField('Nom', max_length=100, unique=True) @@ -137,7 +133,6 @@ PAYMENT_TYPES = ( ) -@python_2_unicode_compatible class Participant(models.Model): user = models.ForeignKey(User) choices = models.ManyToManyField(Spectacle, @@ -165,7 +160,6 @@ DOUBLE_CHOICES = ( ) -@python_2_unicode_compatible class ChoixSpectacle(models.Model): participant = models.ForeignKey(Participant) spectacle = models.ForeignKey(Spectacle, related_name="participants") @@ -184,7 +178,7 @@ class ChoixSpectacle(models.Model): def __str__(self): return "Vœux de %s pour %s" % ( - self.participant.user.get_full_name, + self.participant.user.get_full_name(), self.spectacle.title) class Meta: @@ -194,7 +188,6 @@ class ChoixSpectacle(models.Model): verbose_name_plural = "voeux" -@python_2_unicode_compatible class Attribution(models.Model): participant = models.ForeignKey(Participant) spectacle = models.ForeignKey(Spectacle, related_name="attribues") @@ -205,7 +198,6 @@ class Attribution(models.Model): self.spectacle.date) -@python_2_unicode_compatible class SpectacleRevente(models.Model): attribution = models.OneToOneField(Attribution, related_name="revente")