diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py index 38f1394..0c10f5b 100644 --- a/jarvis/followup/views.py +++ b/jarvis/followup/views.py @@ -1319,8 +1319,8 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None): """Création d'un record de la class Intentity. Args: - intensity_id (int): identifiant d'un plan (classe ). - gymnast_id (int): identifiant d'un gymnaste (classe ). + intensity_id (int) identifiant d'une intensité (classe ). + gymnast_id (int) identifiant d'un gymnaste (classe ). """ if intensity_id: @@ -1346,6 +1346,11 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None): # notification receiver = [] + date = form.cleaned_data["date"] + time = form.cleaned_data["time"] + difficulty = form.cleaned_data["difficulty"] + quantity_of_skill = form.cleaned_data["quantity_of_skill"] + number_of_passes = form.cleaned_data["number_of_passes"] gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id) functionality = ContentType.objects.get(model="intensity") for notification in gymnast.notifications.filter( @@ -1355,12 +1360,12 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None): send_mail( f"{gymnast} : Nouvelle intensité", - f"Une nouvelle note vous a été envoyée pour {gymnast}", + f"{gymnast} a encodé une nouvelle intensité.", settings.EMAIL_HOST_USER, receiver, fail_silently=False, html_message=f"""

Bonjour,

-

Une nouvelle intensité a été encodée pour {gymnast}.


+

{gymnast} a encodé une nouvelle intensité ({date}) : {number_of_passes} en {time}min ({difficulty} | {quantity_of_skill}).


Excellente journée

Jarvis

""", )