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
Anthony
memopol
Commits
da580a2a
Commit
da580a2a
authored
Apr 15, 2016
by
Nicolas Joyard
Browse files
Add chamber to group lists
parent
9a4fa745
Changes
2
Hide whitespace changes
Inline
Side-by-side
memopol/urls.py
View file @
da580a2a
...
...
@@ -10,6 +10,10 @@ admin.autodiscover()
urlpatterns
=
[
# Project-specific overrides
url
(
r
'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/(?P<group>.+)/$'
,
views
.
RepresentativeList
.
as_view
(),
),
url
(
r
'^legislature/representative/(?P<group_kind>\w+)/(?P<group>.+)/$'
,
views
.
RepresentativeList
.
as_view
(),
...
...
templates/representatives/group_list.haml
View file @
da580a2a
...
...
@@ -4,8 +4,12 @@
%table
.table
-
for
group
in
object_list
%tr
-
if
group
.
kind
!=
'country'
and
group
.
kind
!=
'chamber'
%td
%a
{
'href'
:
"{% url 'representatives:representative-list' group_kind='chamber' group=group.chamber.name %}"
}=
group
.
chamber
.
name
%td
%a
{
'href'
:
'
{{
group
.
get_absolute_url
}}
'
}
w
%a
{
'href'
:
'
{{
group
.
get_absolute_url
}}
'
}
-
if
group
.
abbreviation
={
group
.
abbreviation
}
%td
...
...
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