diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html
index 593c3730..5cc678d1 100644
--- a/bda/templates/bda-participants.html
+++ b/bda/templates/bda-participants.html
@@ -1,5 +1,4 @@
{% extends "base_title.html" %}
-{% load utils %}
{% block realcontent %}
Nom |
- Clipper |
+ Identifiant |
Places |
Adresse Mail |
PayƩ |
@@ -18,7 +17,7 @@
{{participant.name}} |
{{participant.username}} |
- {{participant.nb_places}} place{{participant.nb_places|pluralize:",s"}} |
+ {{participant.nb_places}} place{{participant.nb_places|pluralize}} |
{{participant.email}} |
@@ -49,6 +48,7 @@
| |
+
{%for participant in participants %}{{participant.email}}, {%endfor%}
diff --git a/bda/views.py b/bda/views.py
index b95fb50e..e004854f 100644
--- a/bda/views.py
+++ b/bda/views.py
@@ -293,18 +293,27 @@ def revente(request, tirage_id):
@buro_required
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)
+ spectacle = get_object_or_404(Spectacle, id=spectacle_id, tirage=tirage)
attributions = spectacle.attribues.all()
participants = {}
for attrib in attributions:
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':attrib.given, 'paid':participant.paid, 'nb_places':1}
+ participant_info = {'lastname':participant.user.last_name,
+ 'name': participant.user.get_full_name,
+ 'username':participant.user.username,
+ 'email':participant.user.email,
+ 'given':attrib.given,
+ 'paid':participant.paid,
+ 'nb_places':1}
if participant.id in participants:
participants[participant.id]['nb_places'] = 2
else:
participants[participant.id] = participant_info
-
- return render(request, "bda-participants.html", {"spectacle": spectacle, "participants": sorted(participants.values(), key=lambda part: part['lastname'])})
+
+ participants_info = sorted(participants.values(),
+ key=lambda part: part['lastname'])
+ return render(request, "bda-participants.html",
+ {"spectacle": spectacle, "participants": participants_info})
@buro_required
def add_attrib(request, tirage_id, spectacle_id):