Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
memopol
Commits
4085501d
Commit
4085501d
authored
Oct 11, 2016
by
Nicolas Joyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci fix] enforce email ordering on csv exports
parent
c061527a
Pipeline
#189
failed with stage
in 8 minutes and 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
16 deletions
+22
-16
src/memopol/tests/response_fixtures/RepresentativeListTest.test_csv.content
...response_fixtures/RepresentativeListTest.test_csv.content
+6
-6
src/memopol/tests/response_fixtures/RepresentativeListTest.test_order_csv.content
...se_fixtures/RepresentativeListTest.test_order_csv.content
+6
-6
src/memopol/tests/response_fixtures/RepresentativeListTest.test_search_csv.content
...e_fixtures/RepresentativeListTest.test_search_csv.content
+2
-2
src/memopol/views/representative_list.py
src/memopol/views/representative_list.py
+8
-2
No files found.
src/memopol/tests/response_fixtures/RepresentativeListTest.test_csv.content
View file @
4085501d
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]
Jean-Claude Bouchet,"jcbouchet@assemblee-nationale.fr, jcbouchet@jcbouchet.fr",LR,France [FR]
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
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]
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]
Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,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]
Jo LEINEN,jo.leinen@europarl.europa.eu,SD,Germany [DE]
Pierre Lellouche,plellouche@assemblee-nationale.fr,LR,France [FR]
Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR]
Pierre Lequiller,"p
lequiller@assemblee-nationale.fr, pierre.lequiller@gmail.com
",LR,France [FR]
Pierre Lequiller,"p
ierre.lequiller@gmail.com, plequiller@assemblee-nationale.fr
",LR,France [FR]
Arne LIETZ,arne.lietz@europarl.europa.eu,SD,Germany [DE]
Verónica LOPE FONTAGNÉ,veronica.lopefontagne@europarl.europa.eu,EPP,Spain [ES]
Jacqueline Maquet,"j
-maquet@orange.fr, jmaquet@assemblee-national
e.fr",SER,France [FR]
Jacqueline Maquet,"j
maquet@assemblee-nationale.fr, j-maquet@orang
e.fr",SER,France [FR]
Philippe Martin,pmartin@assemblee-nationale.fr,SER,France [FR]
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]
Paul NUTTALL,paul.nuttall@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]
François Pupponi,fpupponi@assemblee-nationale.fr,SER,France [FR]
Jean-Luc Reitzer,"j
lr.depute@orange.fr, jlreitzer@assemblee-nationale.fr, jeanluc.reitzer@wanadoo
.fr",LR,France [FR]
Jean-Luc Reitzer,"j
eanluc.reitzer@wanadoo.fr, jlr.depute@orange.fr, jlreitzer@assemblee-nationale
.fr",LR,France [FR]
Franck Reynier,freynier@assemblee-nationale.fr,UDI,France [FR]
Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@assemblee-nationale.fr",SER,France [FR]
André Santini,asantini@assemblee-nationale.fr,UDI,France [FR]
...
...
src/memopol/tests/response_fixtures/RepresentativeListTest.test_order_csv.content
View file @
4085501d
...
...
@@ -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]
Angelika NIEBLER,angelika.niebler@europarl.europa.eu,EPP,Germany [DE]
Mirosław PIOTROWSKI,miroslaw.piotrowski@europarl.europa.eu,ECR,Poland [PL]
Thierry Benoit,"
tbenoit@assemblee-nationale.fr, contact@thierry-benoit
.fr",UDI,France [FR]
Pierre Lequiller,"p
lequiller@assemblee-nationale.fr, pierre.lequiller@gmail.com
",LR,France [FR]
Thierry Benoit,"
contact@thierry-benoit.fr, tbenoit@assemblee-nationale
.fr",UDI,France [FR]
Pierre Lequiller,"p
ierre.lequiller@gmail.com, plequiller@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]
Philippe Vigier,pvigier@assemblee-nationale.fr,UDI,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]
Dominique Dord,ddord@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]
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]
Olivier Dussopt,odussopt@assemblee-nationale.fr,SER,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]
Marcel Rogemont,"marcel.rogemont@wanadoo.fr, mrogemont@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]
Jacqueline Maquet,"j
-maquet@orange.fr, jmaquet@assemblee-national
e.fr",SER,France [FR]
Jacqueline Maquet,"j
maquet@assemblee-nationale.fr, j-maquet@orang
e.fr",SER,France [FR]
Annick Lepetit,"alepetit@assemblee-nationale.fr, annick-lepetit@wanadoo.fr",SER,France [FR]
Jean-Luc Reitzer,"j
lr.depute@orange.fr, jlreitzer@assemblee-nationale.fr, jeanluc.reitzer@wanadoo
.fr",LR,France [FR]
Jean-Luc Reitzer,"j
eanluc.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]
Dietmar KÖSTER,dietmar.koester@europarl.europa.eu,SD,Germany [DE]
Patrick O'FLYNN,patrick.oflynn@europarl.europa.eu,EFDD,United Kingdom [GB]
...
...
src/memopol/tests/response_fixtures/RepresentativeListTest.test_search_csv.content
View file @
4085501d
Marcel Bonnot,"marcelbonnot@yahoo.fr, mbonnot@assemblee-nationale.fr",LR,France [FR]
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]
Sylvia-Yvonne KAUFMANN,sylvia-yvonne.kaufmann@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-national
e.fr",SER,France [FR]
Jacqueline Maquet,"j
maquet@assemblee-nationale.fr, j-maquet@orang
e.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]
Hermann WINKLER,hermann.winkler@europarl.europa.eu,EPP,Germany [DE]
src/memopol/views/representative_list.py
View file @
4085501d
...
...
@@ -3,9 +3,10 @@
from
core.views
import
GridListMixin
,
PaginationMixin
,
CSVDownloadMixin
,
\
ActiveLegislatureMixin
,
SortMixin
from
django.db
import
models
from
django.views
import
generic
from
representatives.models
import
Representative
from
representatives.models
import
Representative
,
Email
from
..filters
import
RepresentativeFilter
from
.representative_mixin
import
RepresentativeViewMixin
...
...
@@ -72,7 +73,12 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
def
get_csv_results
(
self
,
context
,
**
kwargs
):
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
)
for
r
in
qs
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment