mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 07:58:26 +02:00
Send mail with plain text to new organizers
This commit is contained in:
@ -188,8 +188,9 @@ class AddOrganizerView(AdminMixin, CreateView):
|
||||
|
||||
def form_valid(self, form):
|
||||
user = form.instance
|
||||
msg = render_to_string("mail_templates/add_organizer.html", context=dict(user=user))
|
||||
send_mail('Organisateur du TFJM² 2020', msg, 'contact@tfjm.org', [user.email])
|
||||
msg = render_to_string("mail_templates/add_organizer.txt", context=dict(user=user))
|
||||
msg_html = render_to_string("mail_templates/add_organizer.html", context=dict(user=user))
|
||||
send_mail('Organisateur du TFJM² 2020', msg, 'contact@tfjm.org', [user.email], html_message=msg_html)
|
||||
return super().form_valid(form)
|
||||
|
||||
def get_success_url(self):
|
||||
|
Reference in New Issue
Block a user