From 1b42acb890ac848fa13d5635a43febbb4f2b6459 Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Mon, 14 Sep 2020 10:33:22 +0200 Subject: [PATCH] Add mode to appointments https://trackers.pilotsystems.net/probarreau/0894 --- teleforma/admin.py | 6 +++--- teleforma/views/appointment.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/teleforma/admin.py b/teleforma/admin.py index ca3c64ff..c8ae9b7a 100644 --- a/teleforma/admin.py +++ b/teleforma/admin.py @@ -317,7 +317,7 @@ class AppointmentJuryAdmin(admin.ModelAdmin): class AppointmentAdmin(admin.ModelAdmin): list_display = ('real_date', 'student', 'jury') - list_filter = ('slot__date', 'slot__appointment_period') + list_filter = ('slot__date', 'slot__appointment_period', 'slot__mode') actions = ['export_csv'] def export_csv(self, request, queryset): @@ -325,7 +325,7 @@ class AppointmentAdmin(admin.ModelAdmin): response['Content-Disposition'] = 'attachment; filename=rendezvous.csv' writer = csv.writer(response) - writer.writerow(['date', 'creneau', 'nom', 'prenom', 'email', 'iej', 'jury']) + writer.writerow(['date', 'creneau', 'nom', 'prenom', 'email', 'iej', 'jury', 'mode']) def csv_encode(item): if isinstance(item, unicode): return item.encode('utf-8') @@ -336,7 +336,7 @@ class AppointmentAdmin(admin.ModelAdmin): user = app.student student = user.student.all()[0] - row = [ app.day.strftime('%d/%m/%Y'), app.start, user.last_name, user.first_name, user.email, student.iej, app.jury.name ] + row = [ app.day.strftime('%d/%m/%Y'), app.start, user.last_name, user.first_name, user.email, student.iej, app.jury.name, app.slot.mode ] row = [ csv_encode(col) for col in row ] writer.writerow(row) diff --git a/teleforma/views/appointment.py b/teleforma/views/appointment.py index 983dab74..afa9f845 100644 --- a/teleforma/views/appointment.py +++ b/teleforma/views/appointment.py @@ -134,9 +134,8 @@ class Appointments(View): 'bbb': ap.appointment_period.bbb_room, 'main_text': main_text } # DEBUG - data['mto'] = "yoanl@pilotsystems.net" + # data['mto'] = "yoanl@pilotsystems.net" # data['mto'] = "dorothee.lavalle@pre-barreau.com" - # data['mto'] = "gael@pilotsystems.net" subject_template = 'teleforma/messages/email_appointment_sujet.txt' message_template = 'teleforma/messages/email_appointment.txt' -- 2.39.5