aboutsummaryrefslogtreecommitdiff
path: root/management/commands/sendmails.py
diff options
context:
space:
mode:
authorAlban Gruin2017-02-05 16:20:25 +0100
committerAlban Gruin2017-02-05 16:20:25 +0100
commit1d42eed9fb6c1cc5fc7b77486277a88d7fc6cb01 (patch)
tree5a1b40131cd95c43d222f8c6254015f72ca41ed1 /management/commands/sendmails.py
parentf387c46c5a513e3a6f8e23a8b33c3847a55654d6 (diff)
Affichage du domaine complet dans les mails et du lien de désinscription dans les notifications mail
Attention, requiert de paramétrer le nom de domaine par défaut dans les paramètres de Django : ajout de la variable DEFAULT_DOMAIN dans le fichier settings.py
Diffstat (limited to 'management/commands/sendmails.py')
-rw-r--r--management/commands/sendmails.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/management/commands/sendmails.py b/management/commands/sendmails.py
index b700990..72921f7 100644
--- a/management/commands/sendmails.py
+++ b/management/commands/sendmails.py
@@ -34,7 +34,7 @@ class Command(BaseCommand):
content[subscription.group.id] = template.render(context)
footer = loader.get_template("mail/mail_footer.txt")
- context = Context({"admins": settings.ADMINS, "token": subscription.token})
+ context = Context({"admins": settings.ADMINS, "token": subscription.token, "domain": settings.DEFAULT_DOMAIN})
mail_content = content[subscription.group.id] + footer.render(context)
mails.append(("{0} - {1} - Semaine {2}".format(subscription.group.timetable.name, subscription.group.name, week), mail_content, settings.DEFAULT_FROM_EMAIL, [subscription.email],))