Adds more fields to the reviews CSV
This commit is contained in:
parent
efd6ff88f8
commit
d9b1583dfe
1 changed files with 18 additions and 2 deletions
|
@ -156,8 +156,9 @@ def review_all_proposals_csv(request):
|
||||||
# The fields from each proposal object to report in the csv
|
# The fields from each proposal object to report in the csv
|
||||||
fields = [
|
fields = [
|
||||||
"id", "proposal_type", "speaker_name","speaker_email", "title",
|
"id", "proposal_type", "speaker_name","speaker_email", "title",
|
||||||
"submitted", "cancelled", "status",
|
"submitted", "other_speakers", "speaker_travel",
|
||||||
"score", "total_votes", "minus_two", "minus_one", "plus_one", "plus_two",
|
"speaker_accommodation", "cancelled", "status", "score", "total_votes",
|
||||||
|
"minus_two", "minus_one", "plus_one", "plus_two",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Fields are the heading
|
# Fields are the heading
|
||||||
|
@ -170,6 +171,21 @@ def review_all_proposals_csv(request):
|
||||||
kind_slug = proposal.kind.slug
|
kind_slug = proposal.kind.slug
|
||||||
proposal.proposal_type = 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):
|
if not request.user.has_perm("reviews.can_review_%s" % section_slug):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue