From 5dbdf9801952d78f74bfa97816604d3ec4944a64 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Tue, 17 Dec 2024 19:56:58 -0500 Subject: [PATCH] Add ability to export attraction signups Requested via Slack. --- uber/site_sections/attractions_admin.py | 8 ++++++++ uber/templates/attractions_admin/event.html | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/uber/site_sections/attractions_admin.py b/uber/site_sections/attractions_admin.py index 2a2b9f1dc..955c48faa 100644 --- a/uber/site_sections/attractions_admin.py +++ b/uber/site_sections/attractions_admin.py @@ -314,6 +314,14 @@ def event( 'event': event, 'message': message } + + @csv_file + def signups_export(self, out, session, id): + event = session.attraction_event(id) + out.writerow(['Attendee', 'Badge #', 'Cellphone', 'Email', 'Signup Time', 'Checked In']) + for signup in event.signups: + out.writerow([signup.attendee.full_name, signup.attendee.badge_num, signup.attendee.cellphone, + signup.attendee.email, signup.signup_time_local, signup.checkin_time_local or 'N/A']) @csrf_protected @not_site_mappable diff --git a/uber/templates/attractions_admin/event.html b/uber/templates/attractions_admin/event.html index 4bd4167ac..53d5d1250 100644 --- a/uber/templates/attractions_admin/event.html +++ b/uber/templates/attractions_admin/event.html @@ -212,7 +212,10 @@

{%- if event.signups -%} -

Attendees Signed Up

+
+

Attendees Signed Up

+ Download CSV +