From 0ef80c43f5674052e1fe3ca122016db4d632a76a Mon Sep 17 00:00:00 2001
From: Secteur Geek <oser.geek@gmail.com>
Date: Thu, 14 Apr 2022 20:09:58 +0200
Subject: [PATCH] Hamza (#57)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Solve public permission files on AWS (#40)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

* Added school info

* Fixed typo in filters

* Sorties (#30)

* Custom participation_inline css

* Ordered student profiles by last modification date in admin

* Ajouté infos sorties

* Sortie thomas (#32)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Sortie thomas (export CSV sorties) (#33)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Ajout export CSV sorties

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>

Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Update runtime.txt

Changement version python

* Ordering students by updated_date

* Notifications for Sec-Gen (#35)

* Custom participation_inline css

* Ajout filtre sur register

* Ajout filtre participation

* Ordered student profiles by last modification date in admin

* Ajouté infos sorties

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Sortie thomas (#32)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Ajout export CSV sorties

* Sortie thomas (export CSV sorties) (#33)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Ajout export CSV sorties

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>

* Erreurs dans visits/admin résolus

* Notifications for Sec-Gen

Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Add context_sheet for visits (#37)

* Custom participation_inline css

* Ajout filtre sur register

* Ajout filtre participation

* Ordered student profiles by last modification date in admin

* Ajouté infos sorties

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Sortie thomas (#32)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Ajout export CSV sorties

* Sortie thomas (export CSV sorties) (#33)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Ajout export CSV sorties

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>

* Erreurs dans visits/admin résolus

* Notifications for Sec-Gen

* Add conext_sheet for visits

* Add context_sheet for visits V2

* Add context_sheet for visits V3

Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Add context sheet for visits V4 (#38)

* Custom participation_inline css

* Ajout filtre sur register

* Ajout filtre participation

* Ordered student profiles by last modification date in admin

* Ajouté infos sorties

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Sortie thomas (#32)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Ajout export CSV sorties

* Sortie thomas (export CSV sorties) (#33)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Ajout export CSV sorties

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>

* Erreurs dans visits/admin résolus

* Notifications for Sec-Gen

* Add conext_sheet for visits

* Add context_sheet for visits V2

* Add context_sheet for visits V3

* Add context_sheet for visits V4

Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Version correction of psycopg2 and tornado

* Solve public permission files on AWS (#39)

* Custom participation_inline css

* Ajout filtre sur register

* Ajout filtre participation

* Ordered student profiles by last modification date in admin

* Ajouté infos sorties

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Sortie thomas (#32)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* Ajout export CSV sorties

* Sortie thomas (export CSV sorties) (#33)

* Updated student admin filters (#28)

* Password reset feature (#8)

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* Add Django Rest auth module

* Try to make the send reset password email work

* Modified template mail for reset

* test

* Added utf-8 support to exported csv and switched delimiter from , to ; in admin interface

* Disabled emails while in dev

* Added multi selection filter in admin

* Fixed mail settings

* Added year field to Tutor serializer

* Fixed year updated before registration form filled

* commit for automatic deploy

* Testing CI

* Added filtering in admin for registration validation

* Added filter to student admin

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>

* Ajout filtre sur register

* Ajout filtre participation

* Ajout de 3 filtres par etablissements

* Ajout 3 filtres pour etablissement V2

* Ajout export CSV sorties

Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>

* Erreurs dans visits/admin résolus

* Notifications for Sec-Gen

* Add conext_sheet for visits

* Add context_sheet for visits V2

* Add context_sheet for visits V3

* Add context_sheet for visits V4

* Solve public permission files on AWS

Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>

* ajout de la possibilite de wait

* Ajout dun champs defaut dans visit

* add file

* add

* Modifications of send's email

* Add grade in csv export

* bug mail

* bug mail

* test v2

* bieento

* fix  trig

* rm default

Co-authored-by: ThomasBidot <77505438+ThomasBidot@users.noreply.github.com>
Co-authored-by: chiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Co-authored-by: Dylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: Arthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: Arthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: Seon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: Bidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: Witeden <58004019+Witeden@users.noreply.github.com>
Co-authored-by: Hamza Touizrat <you@example.com>
Co-authored-by: hamztouiz <71287875+hamztouiz@users.noreply.github.com>
Co-authored-by: Hamzux <hamza.touizrat@studebt-cs.fr>
---
 visits/admin.py   | 13 +++++++------
 visits/signals.py |  2 +-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/visits/admin.py b/visits/admin.py
index 3e2376a..f0d441f 100644
--- a/visits/admin.py
+++ b/visits/admin.py
@@ -1,3 +1,4 @@
+
 """Visits admin panel configuration."""
 
 from django import forms
@@ -122,7 +123,7 @@ class ParticipationInline(admin.TabularInline):
 def accept_selected_participations(modeladmin, request, queryset):
     """Accept selected participations in list view."""
     for obj in queryset:
-        obj.accepted = True
+        obj.accepted = 1
         obj.save()
     count = queryset.count()
     s = pluralize(count)
@@ -137,21 +138,22 @@ accept_selected_participations.short_description = (
 def reject_selected_participations(modeladmin, request, queryset):
     """Reject selected participations in list view."""
     for obj in queryset:
-        obj.accepted = False
+        obj.accepted = 0
         obj.save()
     count = queryset.count()
     s = pluralize(count)
     messages.add_message(request, messages.SUCCESS,
-                         f'{count} participation{s} rejetée{s} avec succès.') ## rejeté place accepté
+                         f'{count} participation{s} rejetée{s} avec succès.')  # rejeté place accepté
 
 
 reject_selected_participations.short_description = (
     'Rejeter les participations sélectionnées')
 
+
 def wait_selected_participations(modeladmin, request, queryset):
     """Reject selected participations in list view."""
     for obj in queryset:
-        obj.accepted = 2 #in wait
+        obj.accepted = 2  # in wait
         obj.save()
     count = queryset.count()
     s = pluralize(count)
@@ -162,6 +164,7 @@ def wait_selected_participations(modeladmin, request, queryset):
 wait_selected_participations.short_description = (
     'Mettre en attentes les participations sélectionnées')
 
+
 @admin.register(Participation)
 class ParticipationAdmin(admin.ModelAdmin):
     """Admin panel for visit participations."""
@@ -195,7 +198,6 @@ class ParticipationAdmin(admin.ModelAdmin):
         response.write(codecs.BOM_UTF8)  # force response to be UTF-8
         writer = csv.writer(response, delimiter=';')
 
-
         writer.writerow(['first_name', 'last_name', 'school', 'grade',
                          'phone_number', 'scholarship'] + field_names)
 
@@ -211,7 +213,6 @@ class ParticipationAdmin(admin.ModelAdmin):
             row = writer.writerow([name[0]['first_name'], name[0]['last_name'], school[0]['school'], school[0]['grade'], name[0]['phone_number'], school[0]['scholarship']] + [getattr(obj, field)
                                                                                                                                                                                for field in field_names])
 
-
             nb_user += 1
         return response
 
diff --git a/visits/signals.py b/visits/signals.py
index 49653be..594fc97 100644
--- a/visits/signals.py
+++ b/visits/signals.py
@@ -23,7 +23,7 @@ def notify_participation(sender, instance: Participation, **kwargs):
 
     The notification is only sent if the participation status has changed.
     """
-    if instance.accepted is None:
+    if instance.accepted is 3:
         return
     if instance.accepted == 2 :
         ConfirmParticipationWait(participation=instance).send()    
-- 
GitLab