Fixes
- La fonction de hashage dans `bda/views` ne fonctionnait plus en py3 - L'attribut `tirage` des participants a été supprimé lors du dernier merge avec master.
This commit is contained in:
parent
e26eee539b
commit
aa95263fc9
2 changed files with 6 additions and 5 deletions
|
@ -115,6 +115,7 @@ PAYMENT_TYPES = (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@python_2_unicode_compatible
|
||||||
class Participant(models.Model):
|
class Participant(models.Model):
|
||||||
user = models.ForeignKey(User)
|
user = models.ForeignKey(User)
|
||||||
choices = models.ManyToManyField(Spectacle,
|
choices = models.ManyToManyField(Spectacle,
|
||||||
|
@ -123,14 +124,14 @@ class Participant(models.Model):
|
||||||
attributions = models.ManyToManyField(Spectacle,
|
attributions = models.ManyToManyField(Spectacle,
|
||||||
through="Attribution",
|
through="Attribution",
|
||||||
related_name="attributed_to")
|
related_name="attributed_to")
|
||||||
paid = models.BooleanField(u"A payé", default=False)
|
paid = models.BooleanField("A payé", default=False)
|
||||||
paymenttype = models.CharField(u"Moyen de paiement",
|
paymenttype = models.CharField("Moyen de paiement",
|
||||||
max_length=6, choices=PAYMENT_TYPES,
|
max_length=6, choices=PAYMENT_TYPES,
|
||||||
blank=True)
|
blank=True)
|
||||||
tirage = models.ForeignKey(Tirage)
|
tirage = models.ForeignKey(Tirage)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __str__(self):
|
||||||
return u"%s" % (self.user)
|
return "%s" % (self.user)
|
||||||
|
|
||||||
DOUBLE_CHOICES = (
|
DOUBLE_CHOICES = (
|
||||||
("1", "1 place"),
|
("1", "1 place"),
|
||||||
|
|
|
@ -65,7 +65,7 @@ def etat_places(request, tirage_id):
|
||||||
|
|
||||||
|
|
||||||
def _hash_queryset(queryset):
|
def _hash_queryset(queryset):
|
||||||
data = serializers.serialize("json", queryset)
|
data = serializers.serialize("json", queryset).encode()
|
||||||
hasher = hashlib.sha256()
|
hasher = hashlib.sha256()
|
||||||
hasher.update(data)
|
hasher.update(data)
|
||||||
return hasher.hexdigest()
|
return hasher.hexdigest()
|
||||||
|
|
Loading…
Reference in a new issue