From d75def74999b2d899a4f506ae87eec96aca40773 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 14 Nov 2019 12:41:47 +0100 Subject: [PATCH] Take Period messages for subsciption email --- .../commands/teleforma-send-subscription-email.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/teleforma/management/commands/teleforma-send-subscription-email.py b/teleforma/management/commands/teleforma-send-subscription-email.py index 1fb769e3..71d718ea 100644 --- a/teleforma/management/commands/teleforma-send-subscription-email.py +++ b/teleforma/management/commands/teleforma-send-subscription-email.py @@ -35,14 +35,17 @@ class Command(BaseCommand): site = Site.objects.get_current() if student.platform_only: mode = 'E-learning' + message = period.message_platform else: mode = 'Presentielle' + message = period.message_local + ctx_dict = {'site': site, 'organization': settings.TELEMETA_ORGANIZATION, 'student': student, 'mode': mode} subject_template = 'teleforma/messages/email_inscr_sujet.txt' - message_template = 'teleforma/messages/email_inscription-new.txt' subject = render_to_string(subject_template, ctx_dict) subject = ''.join(subject.splitlines()) - message = render_to_string(message_template, ctx_dict) + # message_template = 'teleforma/messages/email_inscription-new.txt' + # message = render_to_string(message_template, ctx_dict) send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [student.user.email], fail_silently=False) def handle(self, *args, **options): -- 2.39.5