Skip to content
Snippets Groups Projects
Unverified Commit 2d90f650 authored by ThomasBidot's avatar ThomasBidot Committed by GitHub
Browse files

Rectification Exportation excel sorties (#41)


* 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: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur 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: default avatarSeon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: default avatarBidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: default avatarWiteden <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: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur 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: default avatarSeon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: default avatarBidot-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

* Rectification Exportation excel sorties

Co-authored-by: default avatarDylan Sechet <dylan.sechet82@gmail.com>
Co-authored-by: default avatarBidot-Naude Thomas <thomas.bidotnaude@student-cs.fr>
Co-authored-by: default avatarSeon82 <46298009+Seon82@users.noreply.github.com>
Co-authored-by: default avatarchiahetcho <44137047+chiahetcho@users.noreply.github.com>
Co-authored-by: default avatarflorimondmanca <florimond.manca@gmail.com>
Co-authored-by: default avatarArthur Guédon <arthur.guedon@student-cs.fr>
Co-authored-by: default avatarArthur Guédon <60623551+arthurgdn@users.noreply.github.com>
Co-authored-by: default avatarWiteden <58004019+Witeden@users.noreply.github.com>
parent a19cdf1b
No related branches found
No related tags found
6 merge requests!58Hamza,!52Hamza,!54Add field "en attentes" in participations options,!51Hamza,!48Hamza,!45Hamza
......@@ -63,7 +63,6 @@ class RegistrationsOpenFilter(admin.SimpleListFilter):
class VisitForm(forms.ModelForm):
"""Custom admin form for Visit."""
class Meta: # noqa
model = Visit
fields = '__all__'
......@@ -120,6 +119,7 @@ class ParticipationInline(admin.TabularInline):
class Media:
css = {"all": ("css/hide_admin_original.css",)}
def accept_selected_participations(modeladmin, request, queryset):
"""Accept selected participations in list view."""
for obj in queryset:
......@@ -183,7 +183,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)
......@@ -194,9 +193,9 @@ class ParticipationAdmin(admin.ModelAdmin):
name = User.objects.filter(
email=str(list_email[nb_user])).values('first_name', 'last_name', 'phone_number')
school = Student.objects.filter(
user__email=str(list_email[nb_user])).values('school', 'scholarship')
user__email=str(list_email[nb_user])).values('school', 'grade', 'scholarship')
row = writer.writerow([name[0]['first_name'], name[0]['last_name'], school[0]['school'], name[0]['phone_number'], school[0]['scholarship']] + [getattr(obj, field)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment