aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--management/commands/sendmails.py4
-rw-r--r--templates/mail_footer.txt1
2 files changed, 5 insertions, 0 deletions
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 %}