Commit 4085501d authored by Nicolas Joyard's avatar Nicolas Joyard

[ci fix] enforce email ordering on csv exports

parent c061527a
François Asensi,fasensi@assemblee-nationale.fr,GDR,France [FR] François Asensi,fasensi@assemblee-nationale.fr,GDR,France [FR]
Thierry Benoit,"tbenoit@assemblee-nationale.fr, contact@thierry-benoit.fr",UDI,France [FR] Thierry Benoit,"contact@thierry-benoit.fr, tbenoit@assemblee-nationale.fr",UDI,France [FR]
Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR] Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR]
Jean-Claude Bouchet,"jcbouchet@assemblee-nationale.fr, jcbouchet@jcbouchet.fr",LR,France [FR] Jean-Claude Bouchet,"jcbouchet@assemblee-nationale.fr, jcbouchet@jcbouchet.fr",LR,France [FR]
Paul BRANNEN,paul.brannen@europarl.europa.eu,SD,United Kingdom [GB] Paul BRANNEN,paul.brannen@europarl.europa.eu,SD,United Kingdom [GB]
...@@ -9,7 +9,7 @@ Jean-Louis Christ,"christjl@wanadoo.fr, jlchrist@assemblee-nationale.fr",LR,Fran ...@@ -9,7 +9,7 @@ Jean-Louis Christ,"christjl@wanadoo.fr, jlchrist@assemblee-nationale.fr",LR,Fran
Jean-Michel Couve,"couve.jean-michel@wanadoo.fr, jmcouve@assemblee-nationale.fr",LR,France [FR] Jean-Michel Couve,"couve.jean-michel@wanadoo.fr, jmcouve@assemblee-nationale.fr",LR,France [FR]
Esther de LANGE,esther.delange@europarl.europa.eu,EPP,Netherlands [NL] Esther de LANGE,esther.delange@europarl.europa.eu,EPP,Netherlands [NL]
Albert DESS,albert.dess@europarl.europa.eu,EPP,Germany [DE] Albert DESS,albert.dess@europarl.europa.eu,EPP,Germany [DE]
Marc Dolez,"mdolez@assemblee-nationale.fr, contact@marc-dolez.org",GDR,France [FR] Marc Dolez,"contact@marc-dolez.org, mdolez@assemblee-nationale.fr",GDR,France [FR]
Dominique Dord,ddord@assemblee-nationale.fr,LR,France [FR] Dominique Dord,ddord@assemblee-nationale.fr,LR,France [FR]
Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,France [FR] Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,France [FR]
Daniel Fasquelle,dfasquelle@assemblee-nationale.fr,LR,France [FR] Daniel Fasquelle,dfasquelle@assemblee-nationale.fr,LR,France [FR]
...@@ -27,19 +27,19 @@ Werner LANGEN,werner.langen@europarl.europa.eu,EPP,Germany [DE] ...@@ -27,19 +27,19 @@ Werner LANGEN,werner.langen@europarl.europa.eu,EPP,Germany [DE]
Jo LEINEN,jo.leinen@europarl.europa.eu,SD,Germany [DE] Jo LEINEN,jo.leinen@europarl.europa.eu,SD,Germany [DE]
Pierre Lellouche,plellouche@assemblee-nationale.fr,LR,France [FR] Pierre Lellouche,plellouche@assemblee-nationale.fr,LR,France [FR]
Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR] Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR]
Pierre Lequiller,"plequiller@assemblee-nationale.fr, pierre.lequiller@gmail.com",LR,France [FR] Pierre Lequiller,"pierre.lequiller@gmail.com, plequiller@assemblee-nationale.fr",LR,France [FR]
Arne LIETZ,arne.lietz@europarl.europa.eu,SD,Germany [DE] Arne LIETZ,arne.lietz@europarl.europa.eu,SD,Germany [DE]
Verónica LOPE FONTAGNÉ,veronica.lopefontagne@europarl.europa.eu,EPP,Spain [ES] Verónica LOPE FONTAGNÉ,veronica.lopefontagne@europarl.europa.eu,EPP,Spain [ES]
Jacqueline Maquet,"j-maquet@orange.fr, jmaquet@assemblee-nationale.fr",SER,France [FR] Jacqueline Maquet,"jmaquet@assemblee-nationale.fr, j-maquet@orange.fr",SER,France [FR]
Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR] Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR]
Gesine MEISSNER,gesine.meissner@europarl.europa.eu,ALDE,Germany [DE] Gesine MEISSNER,gesine.meissner@europarl.europa.eu,ALDE,Germany [DE]
Alain Moyne-Bressand,"moyne-bressand.alain@wanadoo.fr, amoyne-bressand@assemblee-nationale.fr",LR,France [FR] Alain Moyne-Bressand,"amoyne-bressand@assemblee-nationale.fr, moyne-bressand.alain@wanadoo.fr",LR,France [FR]
Angelika NIEBLER,angelika.niebler@europarl.europa.eu,EPP,Germany [DE] Angelika NIEBLER,angelika.niebler@europarl.europa.eu,EPP,Germany [DE]
Paul NUTTALL,paul.nuttall@europarl.europa.eu,EFDD,United Kingdom [GB] Paul NUTTALL,paul.nuttall@europarl.europa.eu,EFDD,United Kingdom [GB]
Patrick O'FLYNN,patrick.oflynn@europarl.europa.eu,EFDD,United Kingdom [GB] Patrick O'FLYNN,patrick.oflynn@europarl.europa.eu,EFDD,United Kingdom [GB]
Mirosław PIOTROWSKI,miroslaw.piotrowski@europarl.europa.eu,ECR,Poland [PL] Mirosław PIOTROWSKI,miroslaw.piotrowski@europarl.europa.eu,ECR,Poland [PL]
François Pupponi,fpupponi@assemblee-nationale.fr,SER,France [FR] François Pupponi,fpupponi@assemblee-nationale.fr,SER,France [FR]
Jean-Luc Reitzer,"jlr.depute@orange.fr, jlreitzer@assemblee-nationale.fr, jeanluc.reitzer@wanadoo.fr",LR,France [FR] Jean-Luc Reitzer,"jeanluc.reitzer@wanadoo.fr, jlr.depute@orange.fr, jlreitzer@assemblee-nationale.fr",LR,France [FR]
Franck Reynier,freynier@assemblee-nationale.fr,UDI,France [FR] Franck Reynier,freynier@assemblee-nationale.fr,UDI,France [FR]
Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR] Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR]
André Santini,asantini@assemblee-nationale.fr,UDI,France [FR] André Santini,asantini@assemblee-nationale.fr,UDI,France [FR]
......
...@@ -7,10 +7,10 @@ Verónica LOPE FONTAGNÉ,veronica.lopefontagne@europarl.europa.eu,EPP,Spain [ES] ...@@ -7,10 +7,10 @@ Verónica LOPE FONTAGNÉ,veronica.lopefontagne@europarl.europa.eu,EPP,Spain [ES]
Esther de LANGE,esther.delange@europarl.europa.eu,EPP,Netherlands [NL] Esther de LANGE,esther.delange@europarl.europa.eu,EPP,Netherlands [NL]
Angelika NIEBLER,angelika.niebler@europarl.europa.eu,EPP,Germany [DE] Angelika NIEBLER,angelika.niebler@europarl.europa.eu,EPP,Germany [DE]
Mirosław PIOTROWSKI,miroslaw.piotrowski@europarl.europa.eu,ECR,Poland [PL] Mirosław PIOTROWSKI,miroslaw.piotrowski@europarl.europa.eu,ECR,Poland [PL]
Thierry Benoit,"tbenoit@assemblee-nationale.fr, contact@thierry-benoit.fr",UDI,France [FR] Thierry Benoit,"contact@thierry-benoit.fr, tbenoit@assemblee-nationale.fr",UDI,France [FR]
Pierre Lequiller,"plequiller@assemblee-nationale.fr, pierre.lequiller@gmail.com",LR,France [FR] Pierre Lequiller,"pierre.lequiller@gmail.com, plequiller@assemblee-nationale.fr",LR,France [FR]
Claude Goasguen,cgoasguen@assemblee-nationale.fr,LR,France [FR] Claude Goasguen,cgoasguen@assemblee-nationale.fr,LR,France [FR]
Marc Dolez,"mdolez@assemblee-nationale.fr, contact@marc-dolez.org",GDR,France [FR] Marc Dolez,"contact@marc-dolez.org, mdolez@assemblee-nationale.fr",GDR,France [FR]
Pierre Lellouche,plellouche@assemblee-nationale.fr,LR,France [FR] Pierre Lellouche,plellouche@assemblee-nationale.fr,LR,France [FR]
Philippe Vigier,pvigier@assemblee-nationale.fr,UDI,France [FR] Philippe Vigier,pvigier@assemblee-nationale.fr,UDI,France [FR]
Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR] Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR]
...@@ -18,7 +18,7 @@ Philippe Houillon,phouillon@assemblee-nationale.fr,LR,France [FR] ...@@ -18,7 +18,7 @@ Philippe Houillon,phouillon@assemblee-nationale.fr,LR,France [FR]
Dominique Dord,ddord@assemblee-nationale.fr,LR,France [FR] Dominique Dord,ddord@assemblee-nationale.fr,LR,France [FR]
Jean-Michel Couve,"couve.jean-michel@wanadoo.fr, jmcouve@assemblee-nationale.fr",LR,France [FR] Jean-Michel Couve,"couve.jean-michel@wanadoo.fr, jmcouve@assemblee-nationale.fr",LR,France [FR]
Pascale Got,pgot@assemblee-nationale.fr,SER,France [FR] Pascale Got,pgot@assemblee-nationale.fr,SER,France [FR]
Alain Moyne-Bressand,"moyne-bressand.alain@wanadoo.fr, amoyne-bressand@assemblee-nationale.fr",LR,France [FR] Alain Moyne-Bressand,"amoyne-bressand@assemblee-nationale.fr, moyne-bressand.alain@wanadoo.fr",LR,France [FR]
Jean-Louis Christ,"christjl@wanadoo.fr, jlchrist@assemblee-nationale.fr",LR,France [FR] Jean-Louis Christ,"christjl@wanadoo.fr, jlchrist@assemblee-nationale.fr",LR,France [FR]
Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,France [FR] Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,France [FR]
Jean-Claude Bouchet,"jcbouchet@assemblee-nationale.fr, jcbouchet@jcbouchet.fr",LR,France [FR] Jean-Claude Bouchet,"jcbouchet@assemblee-nationale.fr, jcbouchet@jcbouchet.fr",LR,France [FR]
...@@ -28,9 +28,9 @@ Franck Reynier,freynier@assemblee-nationale.fr,UDI,France [FR] ...@@ -28,9 +28,9 @@ Franck Reynier,freynier@assemblee-nationale.fr,UDI,France [FR]
Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR] Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR]
François Pupponi,fpupponi@assemblee-nationale.fr,SER,France [FR] François Pupponi,fpupponi@assemblee-nationale.fr,SER,France [FR]
Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR] Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR]
Jacqueline Maquet,"j-maquet@orange.fr, jmaquet@assemblee-nationale.fr",SER,France [FR] Jacqueline Maquet,"jmaquet@assemblee-nationale.fr, j-maquet@orange.fr",SER,France [FR]
Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR] Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR]
Jean-Luc Reitzer,"jlr.depute@orange.fr, jlreitzer@assemblee-nationale.fr, jeanluc.reitzer@wanadoo.fr",LR,France [FR] Jean-Luc Reitzer,"jeanluc.reitzer@wanadoo.fr, jlr.depute@orange.fr, jlreitzer@assemblee-nationale.fr",LR,France [FR]
Czesław HOC,czeslaw.hoc@europarl.europa.eu,ECR,Poland [PL] Czesław HOC,czeslaw.hoc@europarl.europa.eu,ECR,Poland [PL]
Dietmar KÖSTER,dietmar.koester@europarl.europa.eu,SD,Germany [DE] Dietmar KÖSTER,dietmar.koester@europarl.europa.eu,SD,Germany [DE]
Patrick O'FLYNN,patrick.oflynn@europarl.europa.eu,EFDD,United Kingdom [GB] Patrick O'FLYNN,patrick.oflynn@europarl.europa.eu,EFDD,United Kingdom [GB]
......
Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR] Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR]
Udo BULLMANN,udo.bullmann@europarl.europa.eu,SD,Germany [DE] Udo BULLMANN,udo.bullmann@europarl.europa.eu,SD,Germany [DE]
Marc Dolez,"mdolez@assemblee-nationale.fr, contact@marc-dolez.org",GDR,France [FR] Marc Dolez,"contact@marc-dolez.org, mdolez@assemblee-nationale.fr",GDR,France [FR]
María Teresa GIMÉNEZ BARBAT,teresa.gimenezbarbat@europarl.europa.eu,ALDE,Ireland [IE] María Teresa GIMÉNEZ BARBAT,teresa.gimenezbarbat@europarl.europa.eu,ALDE,Ireland [IE]
Sylvia-Yvonne KAUFMANN,sylvia-yvonne.kaufmann@europarl.europa.eu,SD,Germany [DE] Sylvia-Yvonne KAUFMANN,sylvia-yvonne.kaufmann@europarl.europa.eu,SD,Germany [DE]
Dietmar KÖSTER,dietmar.koester@europarl.europa.eu,SD,Germany [DE] Dietmar KÖSTER,dietmar.koester@europarl.europa.eu,SD,Germany [DE]
Jacqueline Maquet,"j-maquet@orange.fr, jmaquet@assemblee-nationale.fr",SER,France [FR] Jacqueline Maquet,"jmaquet@assemblee-nationale.fr, j-maquet@orange.fr",SER,France [FR]
Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR] Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR]
Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR] Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR]
Hermann WINKLER,hermann.winkler@europarl.europa.eu,EPP,Germany [DE] Hermann WINKLER,hermann.winkler@europarl.europa.eu,EPP,Germany [DE]
...@@ -3,9 +3,10 @@ ...@@ -3,9 +3,10 @@
from core.views import GridListMixin, PaginationMixin, CSVDownloadMixin, \ from core.views import GridListMixin, PaginationMixin, CSVDownloadMixin, \
ActiveLegislatureMixin, SortMixin ActiveLegislatureMixin, SortMixin
from django.db import models
from django.views import generic from django.views import generic
from representatives.models import Representative from representatives.models import Representative, Email
from ..filters import RepresentativeFilter from ..filters import RepresentativeFilter
from .representative_mixin import RepresentativeViewMixin from .representative_mixin import RepresentativeViewMixin
...@@ -72,7 +73,12 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin, ...@@ -72,7 +73,12 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
def get_csv_results(self, context, **kwargs): def get_csv_results(self, context, **kwargs):
qs = self.get_queryset() qs = self.get_queryset()
qs = qs.prefetch_related('email_set') qs = qs.prefetch_related(
models.Prefetch(
'email_set',
queryset=Email.objects.order_by('email')
)
)
return [self.add_representative_country_and_main_mandate(r) return [self.add_representative_country_and_main_mandate(r)
for r in qs] for r in qs]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment