Compare commits
3 Commits
1fdf322107
...
852394f2b3
Author | SHA1 | Date |
---|---|---|
Gregory Trullemans | 852394f2b3 | |
Gregory Trullemans | 3e48ac0e78 | |
Gregory Trullemans | e84ae786fa |
|
@ -568,6 +568,9 @@ def chrono_create_or_update(request, chrono_id=None, gymnast_id=None):
|
||||||
|
|
||||||
# notification
|
# notification
|
||||||
receiver = []
|
receiver = []
|
||||||
|
score = form.cleaned_data["score"]
|
||||||
|
score_type = form.cleaned_data["score_type"]
|
||||||
|
chrono_type = form.cleaned_data["chrono_type"]
|
||||||
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
|
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
|
||||||
functionality = ContentType.objects.get(model="chrono")
|
functionality = ContentType.objects.get(model="chrono")
|
||||||
for notification in gymnast.notifications.filter(
|
for notification in gymnast.notifications.filter(
|
||||||
|
@ -582,7 +585,7 @@ def chrono_create_or_update(request, chrono_id=None, gymnast_id=None):
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>Un nouveau chrono enregistré pour {gymnast}.</p><br />
|
<p>Nouveau chrono pour {gymnast} : {chrono_type} - {score} ({score_type}).</p><br />
|
||||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -654,6 +657,8 @@ def learnedskill_create_or_update(request, gymnast_id=None):
|
||||||
|
|
||||||
# notification
|
# notification
|
||||||
receiver = []
|
receiver = []
|
||||||
|
skill = form.cleaned_data["skill"]
|
||||||
|
learning_step = form.cleaned_data["learning_step"]
|
||||||
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
|
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
|
||||||
functionality = ContentType.objects.get(model="learnedskill")
|
functionality = ContentType.objects.get(model="learnedskill")
|
||||||
for notification in gymnast.notifications.filter(
|
for notification in gymnast.notifications.filter(
|
||||||
|
@ -668,7 +673,7 @@ def learnedskill_create_or_update(request, gymnast_id=None):
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>Un nouveau skill () a été appris par {gymnast}.</p><br />
|
<p>{gymnast} a appris {skill} ({learning_step}).</p><br />
|
||||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -959,7 +964,7 @@ def mindstate_create_or_update(
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>Un nouvel état d'esprit enregistré pour {gymnast}.</p><br />
|
<p>{gymnast} a ajouté état son esprit enregistré ({date}) : {score}/10.</p><br />
|
||||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1368,7 +1373,7 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None):
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>{gymnast} a encodé une nouvelle intensité ({date}) : {number_of_passes} en {time}min ({difficulty} | {quantity_of_skill}).</p><br />
|
<p>{gymnast} a encodé une nouvelle intensité (pour le {date.strftime('%d %B %Y')}) : {number_of_passes} passages en {time} min (diff : {difficulty} | # skills : {quantity_of_skill}).</p><br />
|
||||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue