forked from DGNum/gestioCOF
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):
|
||||
user = models.ForeignKey(User)
|
||||
choices = models.ManyToManyField(Spectacle,
|
||||
|
@ -123,14 +124,14 @@ class Participant(models.Model):
|
|||
attributions = models.ManyToManyField(Spectacle,
|
||||
through="Attribution",
|
||||
related_name="attributed_to")
|
||||
paid = models.BooleanField(u"A payé", default=False)
|
||||
paymenttype = models.CharField(u"Moyen de paiement",
|
||||
paid = models.BooleanField("A payé", default=False)
|
||||
paymenttype = models.CharField("Moyen de paiement",
|
||||
max_length=6, choices=PAYMENT_TYPES,
|
||||
blank=True)
|
||||
tirage = models.ForeignKey(Tirage)
|
||||
|
||||
def __unicode__(self):
|
||||
return u"%s" % (self.user)
|
||||
def __str__(self):
|
||||
return "%s" % (self.user)
|
||||
|
||||
DOUBLE_CHOICES = (
|
||||
("1", "1 place"),
|
||||
|
|
|
@ -65,7 +65,7 @@ def etat_places(request, tirage_id):
|
|||
|
||||
|
||||
def _hash_queryset(queryset):
|
||||
data = serializers.serialize("json", queryset)
|
||||
data = serializers.serialize("json", queryset).encode()
|
||||
hasher = hashlib.sha256()
|
||||
hasher.update(data)
|
||||
return hasher.hexdigest()
|
||||
|
|
Loading…
Reference in a new issue