Update email objectif
This commit is contained in:
parent
e8c8c2f52b
commit
2b284a4705
22
README.md
22
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
|
||||
|
|
|
@ -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"""<p>Bonjour,</p>
|
||||
<p>Nouvelle série comptabilisée pour {gymnast}.</p><br />
|
||||
<p>Nouvel objectif fixé pour {gymnast} : {educative} ({learning_step}) pour le {date} au plus tard.</p><br />
|
||||
<p>Excellente journée</p><p>Jarvis</p>""",
|
||||
)
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<td class="text-left">
|
||||
<a href="{% url 'note_details' note.id %}">{{ note.title }}</a>
|
||||
</td>
|
||||
<td class="text-left">{{ note.coach }}</td>
|
||||
<td class="text-center">{{ note.coach }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue