Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
0cea299b
Commit
0cea299b
authored
Jun 15, 2016
by
Nicolas Joyard
Browse files
CSV export: fix filename + export what is currently filtered
parent
9a94618d
Changes
1
Hide whitespace changes
Inline
Side-by-side
memopol/views/representative_list.py
View file @
0cea299b
...
...
@@ -18,7 +18,7 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
RepresentativeViewMixin
,
ActiveLegislatureMixin
,
generic
.
ListView
):
csv_name
=
'
m
ep
s.csv
'
csv_name
=
'
r
ep
resentatives
'
queryset
=
Representative
.
objects
.
select_related
(
'score'
)
def
get_context_data
(
self
,
**
kwargs
):
...
...
@@ -75,7 +75,7 @@ class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin,
return
qs
def
get_csv_results
(
self
,
context
,
**
kwargs
):
qs
=
super
(
RepresentativeList
,
self
)
.
get_queryset
()
qs
=
self
.
get_queryset
()
qs
=
qs
.
prefetch_related
(
'email_set'
)
return
[
self
.
add_representative_country_and_main_mandate
(
r
)
for
r
in
qs
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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