Update mail sent
This commit is contained in:
parent
ff78905ec5
commit
d991952af8
|
@ -973,7 +973,7 @@ def wellbeing_create_or_update(
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>{gymnast} a ajouté état son esprit enregistré ({date}) :
|
<p>{gymnast} a ajouté son état de bien être pour le ({date.strftime('%d %B %Y')}) :</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Mindstate: {mindstate}</li>
|
<li>Mindstate: {mindstate}</li>
|
||||||
<li>Sleep: {sleep}</li>
|
<li>Sleep: {sleep}</li>
|
||||||
|
@ -981,7 +981,7 @@ def wellbeing_create_or_update(
|
||||||
<li>Fatigue: {fatigue}</li>
|
<li>Fatigue: {fatigue}</li>
|
||||||
<li>Muscle_soreness: {muscle_soreness}</li>
|
<li>Muscle_soreness: {muscle_soreness}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p><br />
|
<br />
|
||||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1063,6 +1063,7 @@ def heightweight_create_or_update(request, heightweight_id=None, gymnast_id=None
|
||||||
|
|
||||||
# notification
|
# notification
|
||||||
receiver = []
|
receiver = []
|
||||||
|
date = form.cleaned_data["date"]
|
||||||
height = form.cleaned_data["height"] / 100
|
height = form.cleaned_data["height"] / 100
|
||||||
weight = form.cleaned_data["weight"]
|
weight = form.cleaned_data["weight"]
|
||||||
bmi = weight / (height * height)
|
bmi = weight / (height * height)
|
||||||
|
@ -1076,12 +1077,18 @@ def heightweight_create_or_update(request, heightweight_id=None, gymnast_id=None
|
||||||
|
|
||||||
send_mail(
|
send_mail(
|
||||||
f"{gymnast} : Nouveau poids/taille enregistré",
|
f"{gymnast} : Nouveau poids/taille enregistré",
|
||||||
f"Un nouveau poids/taille enregistré pour {gymnast} : {height}cm / {weight}kg ({bmi}).",
|
f"Un nouveau poids/taille enregistré pour {gymnast} ({date}) : {height}cm / {weight}kg (BMI: {bmi}).",
|
||||||
settings.EMAIL_HOST_USER,
|
settings.EMAIL_HOST_USER,
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>Un nouveau poids/taille enregistré pour {gymnast} : {height}cm / {weight}kg ({bmi}).</p><br />
|
<p>Un nouveau poids/taille enregistré pour {gymnast} pour le {date.strftime('%d %B %Y')} :</p>
|
||||||
|
<ul>
|
||||||
|
<li>{height}cm</li>
|
||||||
|
<li>{weight}kg</li>
|
||||||
|
<li>BMI : {bmi}</li>
|
||||||
|
</ul>
|
||||||
|
<br />
|
||||||
<p>Excellente journée</p>
|
<p>Excellente journée</p>
|
||||||
<p>Jarvis</p>""",
|
<p>Jarvis</p>""",
|
||||||
)
|
)
|
||||||
|
@ -1299,7 +1306,7 @@ def plan_create_or_update(request, plan_id=None, gymnast_id=None, skill_id=None)
|
||||||
receiver,
|
receiver,
|
||||||
fail_silently=False,
|
fail_silently=False,
|
||||||
html_message=f"""<p>Bonjour,</p>
|
html_message=f"""<p>Bonjour,</p>
|
||||||
<p>Nouvel objectif fixé pour {gymnast} : {educative} ({learning_step}) pour le {date} au plus tard.</p>
|
<p>Nouvel objectif fixé pour {gymnast} : {educative} ({learning_step}) pour le {date.strftime('%d %B %Y')} au plus tard.</p>
|
||||||
<br />
|
<br />
|
||||||
<p>Excellente journée</p>
|
<p>Excellente journée</p>
|
||||||
<p>Jarvis</p>""",
|
<p>Jarvis</p>""",
|
||||||
|
|
Loading…
Reference in New Issue