diff --git a/README.md b/README.md index 566590c..8b7d2a9 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,28 @@ Pour charger les données, tapez ensuite : ```bash python manage.py loaddata save.json ``` +## Commandes +Pour refaire la learning line des skills : +```python + heroku run python manage.py rebuild_closure_table_tree_for_skill +``` + +Pour refaire la learning line des séries : +```python + heroku run python manage.py rebuild_closure_table_tree_for_routine +``` + +Pour remettre tous les rank des skills à 0 : +```python + heroku run python manage.py remove_rank_from_skill +``` + +Pour retirer les espaces dans le code numérique des skills : +```python + heroku run python manage.py remove_space_from_skill_notation +``` + + ## Applications ### Right diff --git a/jarvis/followup/views.py b/jarvis/followup/views.py index 7008812..3c20538 100644 --- a/jarvis/followup/views.py +++ b/jarvis/followup/views.py @@ -1263,6 +1263,9 @@ def plan_create_or_update(request, plan_id=None, gymnast_id=None, skill_id=None) # notification receiver = [] gymnast = Gymnast.objects.get(pk=form.cleaned_data["gymnast"].id) + date = form.cleaned_data["date"] + educative = form.cleaned_data["educative"] + learning_step = form.cleaned_data["learning_step"] functionality = ContentType.objects.get(model="plan") for notification in gymnast.notifications.filter( functionality=functionality @@ -1270,13 +1273,13 @@ def plan_create_or_update(request, plan_id=None, gymnast_id=None, skill_id=None) receiver.append(notification.user.email) send_mail( - f"{gymnast} : Nouvelle série comptabilisée", - f"Nouvelle série comptabilisée pour {gymnast}", + f"{gymnast} : Nouvel objectif fixé", + f"Nouvel objectif fixé pour {gymnast}", settings.EMAIL_HOST_USER, receiver, fail_silently=False, html_message=f"""

Bonjour,

-

Nouvelle série comptabilisée pour {gymnast}.


+

Nouvel objectif fixé pour {gymnast} : {educative} ({learning_step}) pour le {date} au plus tard.


Excellente journée

Jarvis

""", ) diff --git a/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html b/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html index b08ab2d..bd80048 100644 --- a/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html +++ b/jarvis/people/templates/gymnasts/tabs/tab_events_and_notes.html @@ -87,7 +87,7 @@ {{ note.title }} - {{ note.coach }} + {{ note.coach }} {% endfor %}