From de227efcb01bee5a3e36976f854df22b833411bd Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 9 Jun 2016 13:07:02 +0200 Subject: [PATCH 01/17] Ajoute l'admin des tirages BDA sur la page d'accueil --- gestioncof/templates/home.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gestioncof/templates/home.html b/gestioncof/templates/home.html index f0aecebc..52c0ebfd 100644 --- a/gestioncof/templates/home.html +++ b/gestioncof/templates/home.html @@ -63,6 +63,12 @@
  • Sondage : {{ survey.title }}
  • {% endfor %}
    +

    Gestion tirages BDA

    + {% for tirage in open_tirages %} +
  • {{ tirage.title }}
  • + {% endfor %} + +
  • Liens utiles du COF
  • Liens utiles BdA
  • From 6cd89da67c5ec29090728f48d476da99dd8283f0 Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 9 Jun 2016 13:10:59 +0200 Subject: [PATCH 02/17] =?UTF-8?q?Donne=20plus=20d'infos=20=C3=A0=20la=20vu?= =?UTF-8?q?e=20spectacles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/views.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bda/views.py b/bda/views.py index f4495f55..2161b682 100644 --- a/bda/views.py +++ b/bda/views.py @@ -306,7 +306,17 @@ def revente(request, tirage_id): def spectacle(request, tirage_id, spectacle_id): tirage = get_object_or_404(Tirage, id=tirage_id) spectacle = get_object_or_404(Spectacle, id = spectacle_id, tirage=tirage) - return render(request, "bda-emails.html", {"spectacle": spectacle}) + attributions = spectacle.attribues.all() + participants = [] + for attrib in attributions: + participant = attrib.participant + if (participant in participants): + participant.nb_places = 2 + else: + participant.nb_places = 1 + participants.append(participant) + + return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants}) class SpectacleListView(ListView): From 96195f1e813dfab0d002dd3cf33dcac2c95a389b Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 9 Jun 2016 14:31:40 +0200 Subject: [PATCH 03/17] ajoute un tag True/False -> Oui/Non --- gestioncof/templatetags/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gestioncof/templatetags/utils.py b/gestioncof/templatetags/utils.py index 9c439dd3..5f90722e 100644 --- a/gestioncof/templatetags/utils.py +++ b/gestioncof/templatetags/utils.py @@ -34,3 +34,10 @@ def highlight_clipper(clipper, q): else: text = clipper.username return highlight_text(text, q) + +@register.filter +def oui_ou_non(b): + if b: + return "Oui" + else: + return "Non" From e93e60ec84665b4f763163234bc7465be2b4e5a2 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 10 Jun 2016 18:04:02 +0200 Subject: [PATCH 04/17] =?UTF-8?q?fix=20=C3=A9limination=20des=20doublons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/views.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bda/views.py b/bda/views.py index 2161b682..2e405ec1 100644 --- a/bda/views.py +++ b/bda/views.py @@ -307,16 +307,17 @@ def spectacle(request, tirage_id, spectacle_id): tirage = get_object_or_404(Tirage, id=tirage_id) spectacle = get_object_or_404(Spectacle, id = spectacle_id, tirage=tirage) attributions = spectacle.attribues.all() - participants = [] + participants = {} for attrib in attributions: participant = attrib.participant - if (participant in participants): - participant.nb_places = 2 + participant.given = attrib.given + if (participant.id in participants): + participants[participant.id].nb_places = 2 else: participant.nb_places = 1 - participants.append(participant) + participants[participant.id]=participant - return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants}) + return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants.values()}) class SpectacleListView(ListView): @@ -329,6 +330,7 @@ class SpectacleListView(ListView): def get_context_data(self, **kwargs): context = super(SpectacleListView, self).get_context_data(**kwargs) context['tirage_id'] = self.tirage.id + context['tirage_name'] = self.tirage.title return context @buro_required From e15aed65c9b4a5f272d203c4de72f7965a58418e Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 10 Jun 2016 18:10:25 +0200 Subject: [PATCH 05/17] =?UTF-8?q?D=C3=A9place=20l'interface=20des=20tirage?= =?UTF-8?q?s=20vers=20une=20vue=20sp=C3=A9ciale?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/spectacle_list.html | 11 +++++++++-- gestioncof/templates/utile_bda.html | 10 ---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/bda/templates/spectacle_list.html b/bda/templates/spectacle_list.html index d707dde4..e1863eef 100644 --- a/bda/templates/spectacle_list.html +++ b/bda/templates/spectacle_list.html @@ -1,11 +1,18 @@ {% extends "base_title.html" %} {% block realcontent %} -

    Spectacles

    +

    {{tirage_name}}

    +
    +

    Liste des spectacles

    +
    +

    Exports

    + {% endblock %} diff --git a/gestioncof/templates/utile_bda.html b/gestioncof/templates/utile_bda.html index 5f4f383a..8948de97 100644 --- a/gestioncof/templates/utile_bda.html +++ b/gestioncof/templates/utile_bda.html @@ -10,14 +10,4 @@
  • BdA diffusion
  • BdA revente
  • -

    Tirages

    - {% for tirage in tirages %} -

    {{ tirage.title }}

    - - {% endfor %} {% endblock %} From 185c7b5ca4e51b048898d24bf4f22807750315f8 Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 17:57:31 +0200 Subject: [PATCH 06/17] =?UTF-8?q?Vue=20listant=20les=20participants=20?= =?UTF-8?q?=C3=A0=20un=20spectacle,=20avec=20quelques=20exports=20:=20list?= =?UTF-8?q?e=20des=20mails,=20et=20export=20des=20noms=20pour=20les=20sall?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/bda-participants.html | 72 +++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 bda/templates/bda-participants.html diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html new file mode 100644 index 00000000..64f260b8 --- /dev/null +++ b/bda/templates/bda-participants.html @@ -0,0 +1,72 @@ +{% extends "base_title.html" %} +{% load utils %} + +{% block realcontent %} +

    {{ spectacle }}

    + + + + + + + + + + + + {% for participant in participants %} + + + + + + + + + + {% endfor %} + + {% csrf_token %} + + + + + + + + + +
    NomClipperPlacesAdresse MailPayéDonné
    {{participant.user.get_full_name}}{{participant.user.username}}{{participant.nb_places}} place{{participant.nb_places|pluralize:",s"}}{{participant.user.email}} +
    + {{participant.paid|oui_ou_non}} +
    +
    +
    + {{participant.given|oui_ou_non}} +
    +
    +
    + + + +
    + + + + + +{% endblock %} From 7686d33dff38348eea98e4b70233d59b9a068f94 Mon Sep 17 00:00:00 2001 From: ludo Date: Sun, 12 Jun 2016 18:00:26 +0200 Subject: [PATCH 07/17] =?UTF-8?q?D=C3=A9but=20de=20l'ajout=20de=20particip?= =?UTF-8?q?ants=20=C3=A0=20un=20spectacle=20;=20cr=C3=A9ation=20d'url=20et?= =?UTF-8?q?=20gestion=20de=20formulaire=20(WIP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/urls.py | 3 +++ bda/views.py | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/bda/urls.py b/bda/urls.py index d3f4fe2f..8cd94d17 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -32,4 +32,7 @@ urlpatterns = patterns('', url(r'spectacles/unpaid/(?P\d+)$', "bda.views.unpaid", name="bda-unpaid"), + url(r'spectacles/add-attrib/(?P\d+)/(?P\d+)$', + 'bda.views.add_attrib', + name='bda-add-attrib'), ) diff --git a/bda/views.py b/bda/views.py index c79a5483..9c052c84 100644 --- a/bda/views.py +++ b/bda/views.py @@ -12,6 +12,8 @@ import hashlib from django.core.mail import send_mail from django.utils import timezone from django.views.generic.list import ListView +from django.http import HttpResponseRedirect +from django.core.urlresolvers import reverse from datetime import timedelta import time @@ -305,7 +307,18 @@ def spectacle(request, tirage_id, spectacle_id): return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants.values()}) - +@buro_required +def add_attrib(request, tirage_id, spectacle_id): + tirage = get_object_or_404(Tirage, id=tirage_id) + spectacle = get_object_or_404(Spectacle, id = spectacle_id, tirage=tirage) + # TODO : erreur + part= tirage.participant_set.get(user__username=request.POST['clipper']) + attrib = Attribution(participant=part, spectacle=spectacle, given=request.POST['given']) + attrib.save() + if request.POST['nb_places']==2: + attrib.save() + return HttpResponseRedirect(reverse('bda-spectacle', args=(tirage_id, spectacle_id,))) + class SpectacleListView(ListView): model = Spectacle template_name = 'spectacle_list.html' From 574aaad745915c1830f9909b97a2991e3bf82b0a Mon Sep 17 00:00:00 2001 From: ludo Date: Thu, 16 Jun 2016 15:09:14 +0200 Subject: [PATCH 08/17] =?UTF-8?q?gestion=20des=20erreurs=20et=20des=20mess?= =?UTF-8?q?ages=20associ=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/bda-participants.html | 5 ++++- bda/views.py | 27 +++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index 5cc678d1..ed3767a3 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -2,6 +2,9 @@ {% block realcontent %}

    {{ spectacle }}

    + {% for message in messages %} +

    {{ message }}

    + {% endfor %} @@ -36,7 +39,7 @@ {% csrf_token %} - + -
    @@ -18,8 +18,13 @@ {% for participant in participants %} + + {% csrf_token %} - + - + + {% endfor %} @@ -48,7 +60,7 @@ - +
    {{participant.name}}{{participant.username}}{{participant.username}} + {{participant.nb_places}} place{{participant.nb_places|pluralize}} {{participant.email}} @@ -28,11 +33,18 @@ -
    - {% if participant.given %}Oui{% else %}Non{%endif%} +
    + {% if participant.given == participant.nb_places %}Oui + {% elif participant.given == 0 %}Non + {% else %}{{participant.given}}/{{participant.nb_places}} + {%endif%}

    diff --git a/bda/urls.py b/bda/urls.py index 8cd94d17..1617d36b 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -35,4 +35,7 @@ urlpatterns = patterns('', url(r'spectacles/add-attrib/(?P\d+)/(?P\d+)$', 'bda.views.add_attrib', name='bda-add-attrib'), + url(r'spectacles/del-attrib/(?P\d+)/(?P\d+)$', + 'bda.views.del_attrib', + name='bda-del-attrib'), ) diff --git a/bda/views.py b/bda/views.py index c8e250f1..3f446310 100644 --- a/bda/views.py +++ b/bda/views.py @@ -15,6 +15,7 @@ from django.views.generic.list import ListView from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib import messages +from django.views.decorators.http import require_POST from datetime import timedelta import time @@ -303,11 +304,12 @@ def spectacle(request, tirage_id, spectacle_id): 'name': participant.user.get_full_name, 'username':participant.user.username, 'email':participant.user.email, - 'given':attrib.given, + 'given':int(attrib.given), 'paid':participant.paid, 'nb_places':1} if participant.id in participants: - participants[participant.id]['nb_places'] = 2 + participants[participant.id]['nb_places'] += 1 + participants[participant.id]['given'] += attrib.given else: participants[participant.id] = participant_info @@ -317,9 +319,10 @@ def spectacle(request, tirage_id, spectacle_id): {"spectacle": spectacle, "participants": participants_info}) @buro_required +@require_POST def add_attrib(request, tirage_id, spectacle_id): tirage = get_object_or_404(Tirage, id=tirage_id) - spectacle = get_object_or_404(Spectacle, id = spectacle_id, tirage=tirage) + spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) try: part=tirage.participant_set.get(user__username=request.POST['username']) except Participant.DoesNotExist: @@ -328,14 +331,6 @@ def add_attrib(request, tirage_id, spectacle_id): return HttpResponseRedirect(reverse('bda-spectacle', args=(tirage_id, spectacle_id,))) - places_owned = len(spectacle.attribues.filter(participant=part)) - - if int(request.POST['nb_places'])+places_owned > 2: - messages.add_message(request, messages.ERROR, - "Erreur: on ne peut pas avoir plus de deux places") - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - attrib = Attribution(participant=part, spectacle=spectacle, given=('given' in request.POST)) attrib.save() @@ -345,6 +340,20 @@ def add_attrib(request, tirage_id, spectacle_id): "Attribution réussie !") return HttpResponseRedirect(reverse('bda-spectacle', args=(tirage_id, spectacle_id,))) + +@buro_required +@require_POST +def del_attrib(request, tirage_id, spectacle_id): + tirage = get_object_or_404(Tirage, id=tirage_id) + spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) + part = tirage.participant_set.get(user__username=request.POST['username']) + spectacle.attribues.filter(participant=part).delete() + + + messages.add_message(request, messages.SUCCESS, + "Attribution(s) supprimée(s) !") + return HttpResponseRedirect(reverse('bda-spectacle', + args=(tirage_id, spectacle_id,))) class SpectacleListView(ListView): model = Spectacle diff --git a/gestioncof/static/css/cof.css b/gestioncof/static/css/cof.css index d59e6ded..ed7363c9 100644 --- a/gestioncof/static/css/cof.css +++ b/gestioncof/static/css/cof.css @@ -601,6 +601,11 @@ pre code { .etat-bda tr:nth-child(even) {background: #CCC} +#bda-part-button { + border:none; + background-color:#eee +} + .greenratio { background-color: #3F3; border: 5px solid #ccc; From 199895630e4e6d2174e302f0bf02fc6bd9a0cfa2 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 17 Jun 2016 16:31:08 +0200 Subject: [PATCH 10/17] Gestion de plus de deux places --- bda/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bda/views.py b/bda/views.py index 26ca7cb7..826b2e7f 100644 --- a/bda/views.py +++ b/bda/views.py @@ -334,8 +334,11 @@ def add_attrib(request, tirage_id, spectacle_id): attrib = Attribution(participant=part, spectacle=spectacle, given=('given' in request.POST)) attrib.save() - if request.POST['nb_places']==2: - attrib.save() + if int(request.POST['nb_places'])==2: + attrib2 = Attribution(participant=part, spectacle=spectacle, + given=('given' in request.POST)) + attrib2.save() + messages.add_message(request, messages.SUCCESS, "Attribution réussie !") return HttpResponseRedirect(reverse('bda-spectacle', From 929e70f5d3bae2c1ed08b1702c57d061b9b83e2a Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 24 Jun 2016 16:38:14 +0200 Subject: [PATCH 11/17] Lien vers l'interface admin --- bda/templates/bda-participants.html | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index 9669c939..2ec22155 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -5,6 +5,7 @@ {% for message in messages %}

    {{ message }}

    {% endfor %} +

    Ajouter une attribution

    @@ -18,13 +19,8 @@ {% for participant in participants %} - - {% csrf_token %} - - {% endfor %} - - {% csrf_token %} - - - - - - - - -
    {{participant.name}} {{participant.username}} - {{participant.nb_places}} place{{participant.nb_places|pluralize}} {{participant.email}} @@ -43,25 +39,8 @@ {%endif%}
    -

    From 8e8c9a173a1721177fe3067948b57687fa280974 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 24 Jun 2016 16:52:21 +0200 Subject: [PATCH 12/17] suppression fonctions inutiles --- bda/views.py | 40 ----------------------------------- gestioncof/static/css/cof.css | 5 ----- 2 files changed, 45 deletions(-) diff --git a/bda/views.py b/bda/views.py index a7acc127..d72a0a10 100644 --- a/bda/views.py +++ b/bda/views.py @@ -320,46 +320,6 @@ def spectacle(request, tirage_id, spectacle_id): return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": participants_info}) -@buro_required -@require_POST -def add_attrib(request, tirage_id, spectacle_id): - tirage = get_object_or_404(Tirage, id=tirage_id) - spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) - try: - part=tirage.participant_set.get(user__username=request.POST['username']) - except Participant.DoesNotExist: - messages.add_message(request, messages.ERROR, - u"Erreur : utilisateur %s non trouvé" % request.POST['username']) - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - - attrib = Attribution(participant=part, spectacle=spectacle, - given=('given' in request.POST)) - attrib.save() - if int(request.POST['nb_places'])==2: - attrib2 = Attribution(participant=part, spectacle=spectacle, - given=('given' in request.POST)) - attrib2.save() - - messages.add_message(request, messages.SUCCESS, - "Attribution réussie !") - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - -@buro_required -@require_POST -def del_attrib(request, tirage_id, spectacle_id): - tirage = get_object_or_404(Tirage, id=tirage_id) - spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage) - part = tirage.participant_set.get(user__username=request.POST['username']) - spectacle.attribues.filter(participant=part).delete() - - - messages.add_message(request, messages.SUCCESS, - "Attribution(s) supprimée(s) !") - return HttpResponseRedirect(reverse('bda-spectacle', - args=(tirage_id, spectacle_id,))) - class SpectacleListView(ListView): model = Spectacle template_name = 'spectacle_list.html' diff --git a/gestioncof/static/css/cof.css b/gestioncof/static/css/cof.css index ed7363c9..d59e6ded 100644 --- a/gestioncof/static/css/cof.css +++ b/gestioncof/static/css/cof.css @@ -601,11 +601,6 @@ pre code { .etat-bda tr:nth-child(even) {background: #CCC} -#bda-part-button { - border:none; - background-color:#eee -} - .greenratio { background-color: #3F3; border: 5px solid #ccc; From 963c545eb8aa384363f9eebe837c844a43c09d1f Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 24 Jun 2016 16:54:59 +0200 Subject: [PATCH 13/17] suppression fonctions inutiles --- bda/urls.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bda/urls.py b/bda/urls.py index 1617d36b..d3f4fe2f 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -32,10 +32,4 @@ urlpatterns = patterns('', url(r'spectacles/unpaid/(?P\d+)$', "bda.views.unpaid", name="bda-unpaid"), - url(r'spectacles/add-attrib/(?P\d+)/(?P\d+)$', - 'bda.views.add_attrib', - name='bda-add-attrib'), - url(r'spectacles/del-attrib/(?P\d+)/(?P\d+)$', - 'bda.views.del_attrib', - name='bda-del-attrib'), ) From 36a711339dc40f4758a95f9b49d70c593a01b5c3 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 24 Jun 2016 16:56:43 +0200 Subject: [PATCH 14/17] syntax correction --- bda/templates/bda-participants.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index 2ec22155..1748a027 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -20,7 +20,7 @@ {% for participant in participants %}
    {{participant.name}}{{participant.username}} + {{participant.username}} {{participant.nb_places}} place{{participant.nb_places|pluralize}} {{participant.email}} From 67b56edc3386eb7bf4cd035374fddd56544f6522 Mon Sep 17 00:00:00 2001 From: ludo Date: Sat, 25 Jun 2016 03:37:05 +0200 Subject: [PATCH 15/17] remove useless code --- bda/views.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bda/views.py b/bda/views.py index d72a0a10..1206fec6 100644 --- a/bda/views.py +++ b/bda/views.py @@ -12,10 +12,6 @@ import hashlib from django.core.mail import send_mail from django.utils import timezone from django.views.generic.list import ListView -from django.http import HttpResponseRedirect -from django.core.urlresolvers import reverse -from django.contrib import messages -from django.views.decorators.http import require_POST from datetime import timedelta import time From 4596d588e9160fa600379160a589b220e7736515 Mon Sep 17 00:00:00 2001 From: ludo Date: Sat, 25 Jun 2016 03:37:28 +0200 Subject: [PATCH 16/17] Finished >2 attributions support --- bda/templates/bda-participants.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index 1748a027..a54242d5 100644 --- a/bda/templates/bda-participants.html +++ b/bda/templates/bda-participants.html @@ -2,10 +2,7 @@ {% block realcontent %}

    {{ spectacle }}

    - {% for message in messages %} -

    {{ message }}

    - {% endfor %} -

    Ajouter une attribution

    +

    Ajouter une attribution

    @@ -50,8 +47,7 @@
    From d4040670f519effc71aebba3a8614a05024c6e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Mon, 27 Jun 2016 18:47:31 +0200 Subject: [PATCH 17/17] Typos --- bda/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bda/views.py b/bda/views.py index 1206fec6..996a92fb 100644 --- a/bda/views.py +++ b/bda/views.py @@ -300,11 +300,11 @@ def spectacle(request, tirage_id, spectacle_id): participant = attrib.participant participant_info = {'lastname': participant.user.last_name, 'name': participant.user.get_full_name, - 'username':participant.user.username, - 'email':participant.user.email, - 'given':int(attrib.given), - 'paid':participant.paid, - 'nb_places':1} + 'username': participant.user.username, + 'email': participant.user.email, + 'given': int(attrib.given), + 'paid': participant.paid, + 'nb_places': 1} if participant.id in participants: participants[participant.id]['nb_places'] += 1 participants[participant.id]['given'] += attrib.given