mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-12 18:21:17 +00:00
Compare commits
2 Commits
f2ca4b7446
...
e05a1518d9
Author | SHA1 | Date | |
---|---|---|---|
|
e05a1518d9 | ||
|
2319bdf91e |
@ -13,7 +13,9 @@ Bonjour {{ user.registration }},
|
|||||||
L'équipe « {{ team.name }} » ({{ team.trigram }}) vient de demander à valider son équipe pour participer
|
L'équipe « {{ team.name }} » ({{ team.trigram }}) vient de demander à valider son équipe pour participer
|
||||||
au {{ team.participation.get_problem_display }} des Correspondances des Jeunes Mathématicien·ne·s.
|
au {{ team.participation.get_problem_display }} des Correspondances des Jeunes Mathématicien·ne·s.
|
||||||
Vous pouvez décider d'accepter ou de refuser l'équipe en vous rendant sur la page de l'équipe :
|
Vous pouvez décider d'accepter ou de refuser l'équipe en vous rendant sur la page de l'équipe :
|
||||||
<a href="{% url "participation:team_detail" pk=team.pk %}">{% url "participation:team_detail" pk=team.pk %}</a>
|
<a href="https://{{ domain }}{% url "participation:team_detail" pk=team.pk %}">
|
||||||
|
https://{{ domain }}{% url "participation:team_detail" pk=team.pk %}
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -3,7 +3,7 @@ Bonjour {{ user.registration }},
|
|||||||
L'équipe « {{ team.name }} » ({{ team.trigram }}) vient de demander à valider son équipe pour participer
|
L'équipe « {{ team.name }} » ({{ team.trigram }}) vient de demander à valider son équipe pour participer
|
||||||
au {{ team.participation.get_problem_display }} des Correspondances des Jeunes Mathématicien·ne·s.
|
au {{ team.participation.get_problem_display }} des Correspondances des Jeunes Mathématicien·ne·s.
|
||||||
Vous pouvez décider d'accepter ou de refuser l'équipe en vous rendant sur la page de l'équipe :
|
Vous pouvez décider d'accepter ou de refuser l'équipe en vous rendant sur la page de l'équipe :
|
||||||
{% url "participation:team_detail" pk=team.pk %}
|
https://{{ domain }}{% url "participation:team_detail" pk=team.pk %}
|
||||||
|
|
||||||
Cordialement,
|
Cordialement,
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
|
from django.contrib.sites.models import Site
|
||||||
|
|
||||||
from corres2math.lists import get_sympa_client
|
from corres2math.lists import get_sympa_client
|
||||||
from corres2math.matrix import Matrix
|
from corres2math.matrix import Matrix
|
||||||
from corres2math.views import AdminMixin
|
from corres2math.views import AdminMixin
|
||||||
@ -208,7 +210,7 @@ class TeamDetailView(LoginRequiredMixin, FormMixin, ProcessFormView, DetailView)
|
|||||||
self.object.participation.save()
|
self.object.participation.save()
|
||||||
|
|
||||||
for admin in AdminRegistration.objects.all():
|
for admin in AdminRegistration.objects.all():
|
||||||
mail_context = dict(user=admin.user, team=self.object)
|
mail_context = dict(user=admin.user, team=self.object, domain=Site.objects.first().domain)
|
||||||
mail_plain = render_to_string("participation/mails/request_validation.txt", mail_context)
|
mail_plain = render_to_string("participation/mails/request_validation.txt", mail_context)
|
||||||
mail_html = render_to_string("participation/mails/request_validation.html", mail_context)
|
mail_html = render_to_string("participation/mails/request_validation.html", mail_context)
|
||||||
admin.user.email_user("[Corres2math] Validation d'équipe", mail_plain, html_message=mail_html)
|
admin.user.email_user("[Corres2math] Validation d'équipe", mail_plain, html_message=mail_html)
|
||||||
|
@ -3,3 +3,6 @@
|
|||||||
* * * * * cd /code && python manage.py send_mail -c 1
|
* * * * * cd /code && python manage.py send_mail -c 1
|
||||||
* * * * * cd /code && python manage.py retry_deferred -c 1
|
* * * * * cd /code && python manage.py retry_deferred -c 1
|
||||||
0 0 * * * cd /code && python manage.py purge_mail_log 7 -c 1
|
0 0 * * * cd /code && python manage.py purge_mail_log 7 -c 1
|
||||||
|
|
||||||
|
# Rebuild search index
|
||||||
|
0 * * * * cd /code && python manage.py update_index -v 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user