diff --git a/memopol/urls.py b/memopol/urls.py index cf8d2b7eb98ce0ad732ab0b56b14fb016358b306..333ffb381bf2a4a645a314e7b1041a0d60da9795 100644 --- a/memopol/urls.py +++ b/memopol/urls.py @@ -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(), diff --git a/templates/representatives/group_list.haml b/templates/representatives/group_list.haml index 382336caf0c3eb14dcf31ff2b82e9390c262fa3f..bf7fc5a8e24cabf8e1d5cee21353c8b0e2ce2ebc 100644 --- a/templates/representatives/group_list.haml +++ b/templates/representatives/group_list.haml @@ -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