From 5cf89102a97fc23c955d23ec91623c23465a3b10 Mon Sep 17 00:00:00 2001 From: ludo Date: Wed, 15 Jun 2016 21:19:39 +0200 Subject: [PATCH 1/2] espaces autour des =, code sur 80 colonnes --- bda/views.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bda/views.py b/bda/views.py index 7c7f735c..2ae72e9c 100644 --- a/bda/views.py +++ b/bda/views.py @@ -291,18 +291,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}) class SpectacleListView(ListView): model = Spectacle From 38acbd82d1a3e42d18469325142b1f2c4a4042f3 Mon Sep 17 00:00:00 2001 From: ludo Date: Wed, 15 Jun 2016 21:21:13 +0200 Subject: [PATCH 2/2] =?UTF-8?q?clipper=20chang=C3=A9=20en=20identifiant,?= =?UTF-8?q?=20spaceless=20enlev=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/templates/bda-participants.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bda/templates/bda-participants.html b/bda/templates/bda-participants.html index edf2a9e2..c21d4248 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 %}

{{ spectacle }}

@@ -7,7 +6,7 @@ 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}}
@@ -34,19 +33,18 @@ {% endfor %} +

-{% spaceless %} -{%endspaceless%}