From 684be8570b6e6c1c4c93ce991c4b91254906ae05 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Mon, 23 Jan 2017 13:34:04 +0100 Subject: Ajout du bas de mail avec le lien de désinscription --- management/commands/sendmails.py | 4 ++++ templates/mail_footer.txt | 1 + 2 files changed, 5 insertions(+) create mode 100644 templates/mail_footer.txt diff --git a/management/commands/sendmails.py b/management/commands/sendmails.py index 4e3b663..89c5c1b 100644 --- a/management/commands/sendmails.py +++ b/management/commands/sendmails.py @@ -30,4 +30,8 @@ class Command(BaseCommand): context = Context({"subscription": subscription, "courses": grouped_courses, "week": week}) content[subscription.group.id] = template.render(context) + footer = loader.get_template("mail_footer.txt") + context = Context({"token": subscription.token}) + mail_content = content[subscription.group.id] + footer.render(context) + # send content diff --git a/templates/mail_footer.txt b/templates/mail_footer.txt new file mode 100644 index 0000000..59cb5d6 --- /dev/null +++ b/templates/mail_footer.txt @@ -0,0 +1 @@ +Pour vous désinscrire de cet emploi du temps, suivez ce lien : {% url "cancel" token %} -- cgit v1.2.1