1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-09 12:50:20 +02:00

Merge branch 'master' into 'improvements'

# Conflicts:
#   locale/fr/LC_MESSAGES/django.po
This commit is contained in:
Yohann D'ANELLO
2020-11-16 11:01:19 +00:00
15 changed files with 138 additions and 24 deletions

View File

@ -232,6 +232,11 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
mail_plain = render_to_string("participation/mails/team_validated.txt", mail_context)
mail_html = render_to_string("participation/mails/team_validated.html", mail_context)
send_mail("[Corres2math] Équipe validée", mail_plain, None, [self.object.email], html_message=mail_html)
get_sympa_client().subscribe(self.object.email, "equipes", False, f"Equipe {self.object.name}")
get_sympa_client().unsubscribe(self.object.email, "equipes-non-valides", False)
get_sympa_client().subscribe(self.object.email, f"probleme-{self.object.participation.problem}", False,
f"Equipe {self.object.name}")
elif "invalidate" in self.request.POST:
self.object.participation.valid = None
self.object.participation.save()