From d9b1583dfe61c8dced0b2a7e83ba0323e18b1465 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer <_@chrisjrn.com> Date: Thu, 25 Aug 2016 10:40:21 +1000 Subject: [PATCH] Adds more fields to the reviews CSV --- symposion/reviews/views.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/symposion/reviews/views.py b/symposion/reviews/views.py index 531f2c86..d2ef40e5 100644 --- a/symposion/reviews/views.py +++ b/symposion/reviews/views.py @@ -156,8 +156,9 @@ def review_all_proposals_csv(request): # The fields from each proposal object to report in the csv fields = [ "id", "proposal_type", "speaker_name","speaker_email", "title", - "submitted", "cancelled", "status", - "score", "total_votes", "minus_two", "minus_one", "plus_one", "plus_two", + "submitted", "other_speakers", "speaker_travel", + "speaker_accommodation", "cancelled", "status", "score", "total_votes", + "minus_two", "minus_one", "plus_one", "plus_two", ] # Fields are the heading @@ -170,6 +171,21 @@ def review_all_proposals_csv(request): kind_slug = proposal.kind.slug proposal.proposal_type = kind_slug + proposal.other_speakers = ", ".join( + speaker.name + for speaker in proposal.additional_speakers.all() + ) + + proposal.speaker_travel = ", ".join( + str(bool(speaker.travel_assistance)) + for speaker in proposal.speakers() + ) + + proposal.speaker_accommodation = ", ".join( + str(bool(speaker.accommodation_assistance)) + for speaker in proposal.speakers() + ) + if not request.user.has_perm("reviews.can_review_%s" % section_slug): continue