mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 07:02:22 +00:00
Add e-mail address on tournament export
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
cbf34fe90e
commit
9eed5ca2a0
@ -588,7 +588,8 @@ class TournamentExportCSVView(VolunteerMixin, DetailView):
|
||||
content_type='text/csv',
|
||||
headers={'Content-Disposition': f'attachment; filename="Tournoi de {tournament.name}.csv"'},
|
||||
)
|
||||
writer = csv.DictWriter(resp, ('Tournoi', 'Équipe', 'Trigramme', 'Nom', 'Prénom', 'Genre', 'Date de naissance'))
|
||||
writer = csv.DictWriter(resp, ('Tournoi', 'Équipe', 'Trigramme', 'Nom', 'Prénom', 'Email',
|
||||
'Genre', 'Date de naissance'))
|
||||
writer.writeheader()
|
||||
|
||||
for participation in tournament.participations.filter(valid=True).order_by('team__trigram').all():
|
||||
@ -600,6 +601,7 @@ class TournamentExportCSVView(VolunteerMixin, DetailView):
|
||||
'Trigramme': participation.team.trigram,
|
||||
'Nom': registration.user.last_name,
|
||||
'Prénom': registration.user.first_name,
|
||||
'Email': registration.user.email,
|
||||
'Genre': registration.get_gender_display() if isinstance(registration, StudentRegistration)
|
||||
else 'Encandrant⋅e',
|
||||
'Date de naissance': registration.birth_date if isinstance(registration, StudentRegistration)
|
||||
|
Loading…
Reference in New Issue
Block a user