diff options
| author | Alban Gruin | 2017-01-23 13:34:04 +0100 | 
|---|---|---|
| committer | Alban Gruin | 2017-01-23 13:34:04 +0100 | 
| commit | 684be8570b6e6c1c4c93ce991c4b91254906ae05 (patch) | |
| tree | 39010bc8f19d4ce54bc1acf7ac9ea56648af11e4 | |
| parent | b26de0fca265cfaba7a4e7bdfafa67df7985609e (diff) | |
Ajout du bas de mail avec le lien de désinscription
| -rw-r--r-- | management/commands/sendmails.py | 4 | ||||
| -rw-r--r-- | templates/mail_footer.txt | 1 | 
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 %}  | 
