diff --git a/jarvis/followup/templates/wellbeing/create.html b/jarvis/followup/templates/wellbeing/create.html
index f155115..f833d77 100644
--- a/jarvis/followup/templates/wellbeing/create.html
+++ b/jarvis/followup/templates/wellbeing/create.html
@@ -98,12 +98,16 @@
(1: Very Low - 10: Very High)
+
+
+
+
@@ -116,15 +120,64 @@
{% block footerscript %}
-
{% if request.session.template == 0 %}
diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py
index 68ffbcb..04efaf5 100644
--- a/jarvis/followup/views.py
+++ b/jarvis/followup/views.py
@@ -1059,9 +1059,10 @@ def heightweight_create_or_update(request, heightweight_id=None, gymnast_id=None
# notification
receiver = []
- height = form.cleaned_data["height"]
+ height = form.cleaned_data["height"] / 100
weight = form.cleaned_data["weight"]
bmi = weight / (height * height)
+ bmi = format(bmi, ".1f")
gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id)
functionality = ContentType.objects.get(model="heightweight")
for notification in gymnast.notifications.filter(
@@ -1071,12 +1072,12 @@ def heightweight_create_or_update(request, heightweight_id=None, gymnast_id=None
send_mail(
f"{gymnast} : Nouveau poids/taille enregistré",
- f"Un nouveau poids/taille enregistré pour {gymnast} : {height} / {weight} ({bmi}).",
+ f"Un nouveau poids/taille enregistré pour {gymnast} : {height}cm / {weight}kg ({bmi}).",
settings.EMAIL_HOST_USER,
receiver,
fail_silently=False,
html_message=f"""Bonjour,
- Un nouveau poids/taille enregistré pour {gymnast} : {height} / {weight} ({bmi}).
+ Un nouveau poids/taille enregistré pour {gymnast} : {height}cm / {weight}kg ({bmi}).
Excellente journée
Jarvis
""",
)