diff --git a/memopol/api.py b/memopol/api.py index 40ae7fc6a33ed651a5ecea45fa0ed2817e7f585e..cf4c0702f8be0ff9897f6ae68cf77cb6301715e1 100644 --- a/memopol/api.py +++ b/memopol/api.py @@ -23,14 +23,16 @@ from representatives_recommendations.api import ( router = routers.DefaultRouter() -router.register(r'constituencies', ConstituencyViewSet) -router.register(r'dossiers', DossierViewSet) -router.register(r'dossier_scores', DossierScoreViewSet) -router.register(r'groups', GroupViewSet) -router.register(r'mandates', MandateViewSet) -router.register(r'proposals', ProposalViewSet) -router.register(r'recommendations', RecommendationViewSet) -router.register(r'representatives', RepresentativeViewSet) -router.register(r'scores', RepresentativeScoreViewSet) -router.register(r'vote_scores', VoteScoreViewSet) -router.register(r'votes', VoteViewSet) +router.register(r'constituencies', ConstituencyViewSet, 'api-constituency') +router.register(r'dossiers', DossierViewSet, 'api-dossier') +router.register(r'dossier_scores', DossierScoreViewSet, 'api-dossierscore') +router.register(r'groups', GroupViewSet, 'api-group') +router.register(r'mandates', MandateViewSet, 'api-mandate') +router.register(r'proposals', ProposalViewSet, 'api-proposal') +router.register(r'recommendations', RecommendationViewSet, + 'api-recommendation') +router.register(r'representatives', RepresentativeViewSet, + 'api-representative') +router.register(r'scores', RepresentativeScoreViewSet, 'api-score') +router.register(r'vote_scores', VoteScoreViewSet, 'api-votescore') +router.register(r'votes', VoteViewSet, 'api-vote') diff --git a/memopol/templatetags/memopol_tags.py b/memopol/templatetags/memopol_tags.py index 6c26fea64e55003f03b79646793ec30724dfc1f2..840124bab55acf4e677a9e1b9d2d1ea90f8f415e 100644 --- a/memopol/templatetags/memopol_tags.py +++ b/memopol/templatetags/memopol_tags.py @@ -1,7 +1,11 @@ # coding: utf-8 + +import re + from django import template +from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe -import re +from django.utils.html import escape register = template.Library() link = '<a class="{network}-link" href="{url}" target="_blank">{label}</a>' @@ -30,3 +34,34 @@ def website_link(url): def email_link(address): return mark_safe(link.format(network='email', url='mailto:%s' % address, label=address)) + + +@register.simple_tag +def group_url(group): + if group.kind == 'chamber' or group.chamber is None: + return escape(reverse('representative-list', kwargs={ + 'group_kind': group.kind, + 'group': group.name + })) + else: + return escape(reverse('representative-list', kwargs={ + 'group_kind': group.kind, + 'chamber': group.chamber.name, + 'group': group.name + })) + + +@register.simple_tag +def chamber_url(chamber): + return escape(reverse('representative-list', kwargs={ + 'group_kind': 'chamber', + 'group': chamber.name + })) + + +@register.simple_tag +def country_url(country): + return escape(reverse('representative-list', kwargs={ + 'group_kind': 'country', + 'group': country.name + })) diff --git a/memopol/tests/base.py b/memopol/tests/base.py index 1c4fe97be5cf93eeb10781aae5cc68572d0efe2e..8075a3bd2f8ef8798cec97f5f98fceeba9dc1638 100644 --- a/memopol/tests/base.py +++ b/memopol/tests/base.py @@ -3,6 +3,8 @@ import os.path from django.test import Client +from responsediff.response import Response + class UrlGetTestMixin(object): url = None @@ -35,3 +37,16 @@ class UrlGetTestMixin(object): with open(expected, 'r') as f: self.assertHtmlInResult(f.read()) + + +class ResponseDiffMixin(object): + + def responsediff_test(self, url, numQueries): + # Setup session variables + self.client.get(url) + + with self.assertNumQueries(numQueries): + response = self.client.get(url) + + expected = Response.for_test(self) + expected.assertNoDiff(response) diff --git a/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content b/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content new file mode 100644 index 0000000000000000000000000000000000000000..0f0f6ae3d4c184b56768fba819bd9db6ae8f791e --- /dev/null +++ b/memopol/tests/response_fixtures/DossiersTest.test_dossier_detail/content @@ -0,0 +1,192 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + + <h1> Resolution on the Anti-Counterfeiting Trade Agreement (ACTA)</h1> + <p> + <strong>2010/2935(RSP)</strong> + + </p> + <h2> + Recommendations + + </h2> + <table class='table'> + <tr> + <th> + Proposal + </th> + <th> + Title + </th> + <th> + Recommendation + </th> + <th> + Status + </th> + <th><i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i></th> + <th><i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i></th> + <th><i aria-label="abstain" class="fa fa-circle-o vote_abstain" title="abstain" ></i></th> + + </tr> + + <tr> + <td> + RC-B7-0617/2010 - Accord commercial anti-contrefaçon (ACAC) - Considérant X + <br /> + <small> + B7-0617/2010 + Considérant X + </small> + </td> + <td>Stop acta !</td> + <td><i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i></td> + <td>adopted</td> + <td>329</td> + <td>249</td> + <td>75</td> + + + </tr> + + <tr> + <td> + RC-B7-0617/2010 - Accord commercial anti-contrefaçon (ACAC) - Considérant CC + <br /> + <small> + B7-0617/2010 + Considérant CC + </small> + </td> + <td>Stop acta !</td> + <td><i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i></td> + <td>adopted</td> + <td>315</td> + <td>312</td> + <td>14</td> + + + </tr> + + <tr> + <td> + RC-B7-0617/2010 - Accord commercial anti-contrefaçon (ACAC) - Résolution + <br /> + <small> + B7-0617/2010 + Résolution + </small> + </td> + <td>Stop acta !</td> + <td><i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i></td> + <td>rejected</td> + <td>306</td> + <td>322</td> + <td>26</td> + + + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content b/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content new file mode 100644 index 0000000000000000000000000000000000000000..5bc66b59462ef84cca236481ea6a9fbe769b2935 --- /dev/null +++ b/memopol/tests/response_fixtures/DossiersTest.test_dossier_list/content @@ -0,0 +1,182 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <h1> + Dossiers + + </h1> + <table class='table'> + <tr> + <th> + Title + </th> + <th> + Recommendations + </th> + <th> + Reference + + </th> + </tr> + + <tr> + <td> + <a href='/votes/dossier/28147/'> + Resolution on the Anti-Counterfeiting Trade Agreement (ACTA) + </a> + </td> + <td>3</td> + <td>2010/2935(RSP)</td> + + </tr> + + </table> + <div class='pagination-block'> + + <nav> + <ul class='pagination pagination-sm'> + + + + </ul> + </nav> + <div class='count'> + Number of results : 1 + <br /> + Number of displayed results : + 12 + ( + + <a href='?paginate_by=12'> + 12 + </a> + + / + + + <a href='?paginate_by=24'> + 24 + </a> + + / + + + <a href='?paginate_by=48'> + 48 + </a> + + / + + + <a href='?paginate_by=96'> + 96 + </a> + + + ) + + </div> +</div> + + + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/GroupListTest.test_chambers/content b/memopol/tests/response_fixtures/GroupListTest.test_chambers/content new file mode 100644 index 0000000000000000000000000000000000000000..adfc27952fca7864b28668a7cb9ca4728e85d778 --- /dev/null +++ b/memopol/tests/response_fixtures/GroupListTest.test_chambers/content @@ -0,0 +1,125 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <table class='table'> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + + EP + + </a> + </td> + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/GroupListTest.test_committees/content b/memopol/tests/response_fixtures/GroupListTest.test_committees/content new file mode 100644 index 0000000000000000000000000000000000000000..571bcbc0b35039f61379c1fc11816b9b7eb78250 --- /dev/null +++ b/memopol/tests/response_fixtures/GroupListTest.test_committees/content @@ -0,0 +1,627 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <table class='table'> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Agriculture%20and%20Rural%20Development/'> + + AGRI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Agriculture%20and%20Rural%20Development/'> + + Committee on Agriculture and Rural Development + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Budgetary%20Control/'> + + CONT + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Budgetary%20Control/'> + + Committee on Budgetary Control + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Budgets/'> + + BUDG + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Budgets/'> + + Committee on Budgets + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Civil%20Liberties,%20Justice%20and%20Home%20Affairs/'> + + LIBE + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Civil%20Liberties,%20Justice%20and%20Home%20Affairs/'> + + Committee on Civil Liberties, Justice and Home Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Constitutional%20Affairs/'> + + AFCO + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Constitutional%20Affairs/'> + + Committee on Constitutional Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Culture%20and%20Education/'> + + CULT + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Culture%20and%20Education/'> + + Committee on Culture and Education + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Economic%20and%20Monetary%20Affairs/'> + + ECON + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Economic%20and%20Monetary%20Affairs/'> + + Committee on Economic and Monetary Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Employment%20and%20Social%20Affairs/'> + + EMPL + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Employment%20and%20Social%20Affairs/'> + + Committee on Employment and Social Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Fisheries/'> + + PECH + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Fisheries/'> + + Committee on Fisheries + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Foreign%20Affairs/'> + + AFET + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Foreign%20Affairs/'> + + Committee on Foreign Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Industry,%20Research%20and%20Energy/'> + + ITRE + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Industry,%20Research%20and%20Energy/'> + + Committee on Industry, Research and Energy + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20International%20Trade/'> + + INTA + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20International%20Trade/'> + + Committee on International Trade + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Legal%20Affairs/'> + + JURI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Legal%20Affairs/'> + + Committee on Legal Affairs + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Petitions/'> + + PETI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Petitions/'> + + Committee on Petitions + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Regional%20Development/'> + + REGI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Regional%20Development/'> + + Committee on Regional Development + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Transport%20and%20Tourism/'> + + TRAN + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Transport%20and%20Tourism/'> + + Committee on Transport and Tourism + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Women's%20Rights%20and%20Gender%20Equality/'> + + FEMM + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20Women's%20Rights%20and%20Gender%20Equality/'> + + Committee on Women's Rights and Gender Equality + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20the%20Environment,%20Public%20Health%20and%20Food%20Safety/'> + + ENVI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20the%20Environment,%20Public%20Health%20and%20Food%20Safety/'> + + Committee on the Environment, Public Health and Food Safety + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20the%20Internal%20Market%20and%20Consumer%20Protection/'> + + IMCO + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Committee%20on%20the%20Internal%20Market%20and%20Consumer%20Protection/'> + + Committee on the Internal Market and Consumer Protection + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/committee/European%20Parliament/Subcommittee%20on%20Human%20Rights/'> + + DROI + + </a> + </td> + <td> + <a href='/legislature/representative/committee/European%20Parliament/Subcommittee%20on%20Human%20Rights/'> + + Subcommittee on Human Rights + + + </a> + </td> + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/GroupListTest.test_country/content b/memopol/tests/response_fixtures/GroupListTest.test_country/content new file mode 100644 index 0000000000000000000000000000000000000000..b4b293956d164d77a6fd3251fa807c3d6a2c9811 --- /dev/null +++ b/memopol/tests/response_fixtures/GroupListTest.test_country/content @@ -0,0 +1,620 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <table class='table'> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Austria/'> + + AT + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Austria/'> + + Austria + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Belgium/'> + + BE + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Belgium/'> + + Belgium + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Bulgaria/'> + + BG + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Bulgaria/'> + + Bulgaria + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Cyprus/'> + + CY + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Cyprus/'> + + Cyprus + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Czech%20Republic/'> + + CZ + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Czech%20Republic/'> + + Czech Republic + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Denmark/'> + + DK + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Denmark/'> + + Denmark + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Estonia/'> + + EE + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Estonia/'> + + Estonia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Finland/'> + + FI + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Finland/'> + + Finland + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/France/'> + + FR + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/France/'> + + France + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Germany/'> + + DE + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Germany/'> + + Germany + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Greece/'> + + GR + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Greece/'> + + Greece + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Hungary/'> + + HU + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Hungary/'> + + Hungary + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Ireland/'> + + IE + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Ireland/'> + + Ireland + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Italy/'> + + IT + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Italy/'> + + Italy + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Latvia/'> + + LV + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Latvia/'> + + Latvia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Lithuania/'> + + LT + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Lithuania/'> + + Lithuania + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Luxembourg/'> + + LU + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Luxembourg/'> + + Luxembourg + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Malta/'> + + MT + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Malta/'> + + Malta + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Netherlands/'> + + NL + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Netherlands/'> + + Netherlands + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Poland/'> + + PL + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Poland/'> + + Poland + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Portugal/'> + + PT + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Portugal/'> + + Portugal + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Romania/'> + + RO + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Romania/'> + + Romania + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Slovakia/'> + + SK + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Slovakia/'> + + Slovakia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Slovenia/'> + + SI + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Slovenia/'> + + Slovenia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Spain/'> + + ES + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Spain/'> + + Spain + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/Sweden/'> + + SE + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/Sweden/'> + + Sweden + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/country/European%20Parliament/United%20Kingdom/'> + + GB + + </a> + </td> + <td> + <a href='/legislature/representative/country/European%20Parliament/United%20Kingdom/'> + + United Kingdom + + + </a> + </td> + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/GroupListTest.test_delegations/content b/memopol/tests/response_fixtures/GroupListTest.test_delegations/content new file mode 100644 index 0000000000000000000000000000000000000000..5db3980db7ac3c59a6358dbbba2b534fc2422132 --- /dev/null +++ b/memopol/tests/response_fixtures/GroupListTest.test_delegations/content @@ -0,0 +1,1979 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <table class='table'> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Afghanistan/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Afghanistan/'> + + Delegation for relations with Afghanistan + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Albania,%20Bulgaria%20and%20Romania/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Albania,%20Bulgaria%20and%20Romania/'> + + Delegation for relations with Albania, Bulgaria and Romania + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Bosnia%20and%20Herzegovina,%20and%20Kosovo/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Bosnia%20and%20Herzegovina,%20and%20Kosovo/'> + + Delegation for relations with Bosnia and Herzegovina, and Kosovo + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Bulgaria%20and%20Romania/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Bulgaria%20and%20Romania/'> + + Delegation for relations with Bulgaria and Romania + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Estonia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Estonia/'> + + Delegation for relations with Estonia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Estonia,%20Lithuania%20and%20Latvia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Estonia,%20Lithuania%20and%20Latvia/'> + + Delegation for relations with Estonia, Lithuania and Latvia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20India/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20India/'> + + Delegation for relations with India + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Israel/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Israel/'> + + Delegation for relations with Israel + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Lithuania/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Lithuania/'> + + Delegation for relations with Lithuania + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Mercosur/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Mercosur/'> + + Delegation for relations with Mercosur + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Palestine/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Palestine/'> + + Delegation for relations with Palestine + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Russia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Russia/'> + + Delegation for relations with Russia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20South%20Africa/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20South%20Africa/'> + + Delegation for relations with South Africa + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Sweden/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Sweden/'> + + Delegation for relations with Sweden + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Sweden,%20Finland,%20Iceland%20and%20the%20Nordic%20Council/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Sweden,%20Finland,%20Iceland%20and%20the%20Nordic%20Council/'> + + Delegation for relations with Sweden, Finland, Iceland and the Nordic Council + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland%20and%20Norway%20and%20to%20the%20EU-Iceland%20Joint%20Parliamentary%20Committee%20and%20the%20European%20Economic%20Area%20(EEA)%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland%20and%20Norway%20and%20to%20the%20EU-Iceland%20Joint%20Parliamentary%20Committee%20and%20the%20European%20Economic%20Area%20(EEA)%20Joint%20Parliamentary%20Committee/'> + + Delegation for relations with Switzerland and Norway and to the EU-Iceland Joint Parliamentary Committee and the European Economic Area (EEA) Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland,%20Iceland%20and%20Norway/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland,%20Iceland%20and%20Norway/'> + + Delegation for relations with Switzerland, Iceland and Norway + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland,%20Iceland%20and%20Norway%20and%20to%20the%20European%20Economic%20Area%20(EEA)%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20Switzerland,%20Iceland%20and%20Norway%20and%20to%20the%20European%20Economic%20Area%20(EEA)%20Joint%20Parliamentary%20Committee/'> + + Delegation for relations with Switzerland, Iceland and Norway and to the European Economic Area (EEA) Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Arab%20Peninsula/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Arab%20Peninsula/'> + + Delegation for relations with the Arab Peninsula + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Federative%20Republic%20of%20Brazil/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Federative%20Republic%20of%20Brazil/'> + + Delegation for relations with the Federative Republic of Brazil + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Gulf%20States,%20including%20Yemen/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Gulf%20States,%20including%20Yemen/'> + + Delegation for relations with the Gulf States, including Yemen + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Korean%20Peninsula/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Korean%20Peninsula/'> + + Delegation for relations with the Korean Peninsula + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Maghreb%20countries%20and%20the%20Arab%20Maghreb%20Union/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Maghreb%20countries%20and%20the%20Arab%20Maghreb%20Union/'> + + Delegation for relations with the Maghreb countries and the Arab Maghreb Union + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Maghreb%20countries%20and%20the%20Arab%20Maghreb%20Union%20(including%20Libya)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Maghreb%20countries%20and%20the%20Arab%20Maghreb%20Union%20(including%20Libya)/'> + + Delegation for relations with the Maghreb countries and the Arab Maghreb Union (including Libya) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries/'> + + Delegation for relations with the Mashreq countries + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries%20and%20the%20Gulf/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries%20and%20the%20Gulf/'> + + Delegation for relations with the Mashreq countries and the Gulf + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries%20and%20the%20Gulf%20States/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mashreq%20countries%20and%20the%20Gulf%20States/'> + + Delegation for relations with the Mashreq countries and the Gulf States + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN%20and%20the%20ASEAN%20Interparliamentary%20Organisation%20(AIPO)%20and%20the%20Republic%20of%20Korea/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN%20and%20the%20ASEAN%20Interparliamentary%20Organisation%20(AIPO)%20and%20the%20Republic%20of%20Korea/'> + + Delegation for relations with the Member States of ASEAN and the ASEAN Interparliamentary Organisation (AIPO) and the Republic of Korea + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN,%20South-east%20Asia%20and%20the%20Republic%20of%20Korea/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN,%20South-east%20Asia%20and%20the%20Republic%20of%20Korea/'> + + Delegation for relations with the Member States of ASEAN, South-east Asia and the Republic of Korea + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN,%20south-east%20Asia%20and%20the%20Republic%20of%20Korea/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Member%20States%20of%20ASEAN,%20south-east%20Asia%20and%20the%20Republic%20of%20Korea/'> + + Delegation for relations with the Member States of ASEAN, south-east Asia and the Republic of Korea + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mercosur%20countries/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Mercosur%20countries/'> + + Delegation for relations with the Mercosur countries + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Palestinian%20Legislative%20Council/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Palestinian%20Legislative%20Council/'> + + Delegation for relations with the Palestinian Legislative Council + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Pan-African%20Parliament/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Pan-African%20Parliament/'> + + Delegation for relations with the Pan-African Parliament + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20People's%20Republic%20of%20China/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20People's%20Republic%20of%20China/'> + + Delegation for relations with the People's Republic of China + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Republics%20of%20the%20Commonwealth%20of%20Independent%20States%20(CIS)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20Republics%20of%20the%20Commonwealth%20of%20Independent%20States%20(CIS)/'> + + Delegation for relations with the Republics of the Commonwealth of Independent States (CIS) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20United%20States/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20United%20States/'> + + Delegation for relations with the United States + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20Central%20America%20and%20Mexico/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20Central%20America%20and%20Mexico/'> + + Delegation for relations with the countries of Central America and Mexico + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20America/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20America/'> + + Delegation for relations with the countries of South America + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20America%20and%20MERCOSUR/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20America%20and%20MERCOSUR/'> + + Delegation for relations with the countries of South America and MERCOSUR + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia/'> + + Delegation for relations with the countries of South Asia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia%20and%20the%20South%20Asia%20Association%20for%20Regional%20Cooperation%20(SAARC)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia%20and%20the%20South%20Asia%20Association%20for%20Regional%20Cooperation%20(SAARC)/'> + + Delegation for relations with the countries of South Asia and the South Asia Association for Regional Cooperation (SAARC) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia%20and%20the%20South%20Asian%20Association%20for%20Regional%20Cooperation%20(SAARC)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20South%20Asia%20and%20the%20South%20Asian%20Association%20for%20Regional%20Cooperation%20(SAARC)/'> + + Delegation for relations with the countries of South Asia and the South Asian Association for Regional Cooperation (SAARC) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20Southeast%20Asia%20and%20the%20Association%20of%20Southeast%20Asian%20Nations%20(ASEAN)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20Southeast%20Asia%20and%20the%20Association%20of%20Southeast%20Asian%20Nations%20(ASEAN)/'> + + Delegation for relations with the countries of Southeast Asia and the Association of Southeast Asian Nations (ASEAN) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20south-east%20Europe/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20south-east%20Europe/'> + + Delegation for relations with the countries of south-east Europe + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20the%20Andean%20Community/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20for%20relations%20with%20the%20countries%20of%20the%20Andean%20Community/'> + + Delegation for relations with the countries of the Andean Community + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20ACP-EU%20Joint%20Parliamentary%20Assembly/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20ACP-EU%20Joint%20Parliamentary%20Assembly/'> + + Delegation to the ACP-EU Joint Parliamentary Assembly + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Cariforum%20%E2%80%94%20EU%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Cariforum%20%E2%80%94%20EU%20Parliamentary%20Committee/'> + + Delegation to the Cariforum — EU Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Cyprus%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Cyprus%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EC-Cyprus Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-European%20Economic%20Area%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-European%20Economic%20Area%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EC-European Economic Area Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Malta%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Malta%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EC-Malta Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Sweden%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EC-Sweden%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EC-Sweden Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Albania%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Albania%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + Delegation to the EU-Albania Stabilisation and Association Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Armenia%20and%20EU-Azerbaijan%20Parliamentary%20Cooperation%20Committees%20and%20the%20EU-Georgia%20Parliamentary%20Association%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Armenia%20and%20EU-Azerbaijan%20Parliamentary%20Cooperation%20Committees%20and%20the%20EU-Georgia%20Parliamentary%20Association%20Committee/'> + + Delegation to the EU-Armenia and EU-Azerbaijan Parliamentary Cooperation Committees and the EU-Georgia Parliamentary Association Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Czech%20Republic%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Czech%20Republic%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Czech Republic Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Former%20Yugoslav%20Republic%20of%20Macedonia%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Former%20Yugoslav%20Republic%20of%20Macedonia%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Former Yugoslav Republic of Macedonia Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Kazakhstan,%20EU-Kyrgyzstan%20and%20EU-Uzbekistan%20Parliamentary%20Cooperation%20Committees%20and%20Delegation%20for%20relations%20with%20Tadjikistan,%20Turkmenistan%20and%20Mongolia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Kazakhstan,%20EU-Kyrgyzstan%20and%20EU-Uzbekistan%20Parliamentary%20Cooperation%20Committees%20and%20Delegation%20for%20relations%20with%20Tadjikistan,%20Turkmenistan%20and%20Mongolia/'> + + Delegation to the EU-Kazakhstan, EU-Kyrgyzstan and EU-Uzbekistan Parliamentary Cooperation Committees and Delegation for relations with Tadjikistan, Turkmenistan and Mongolia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Kazakhstan,%20EU-Kyrgyzstan,%20EU-Uzbekistan%20and%20EU-Tajikistan%20Parliamentary%20Cooperation%20Committees%20and%20for%20relations%20with%20Turkmenistan%20and%20Mongolia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Kazakhstan,%20EU-Kyrgyzstan,%20EU-Uzbekistan%20and%20EU-Tajikistan%20Parliamentary%20Cooperation%20Committees%20and%20for%20relations%20with%20Turkmenistan%20and%20Mongolia/'> + + Delegation to the EU-Kazakhstan, EU-Kyrgyzstan, EU-Uzbekistan and EU-Tajikistan Parliamentary Cooperation Committees and for relations with Turkmenistan and Mongolia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Latvia%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Latvia%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Latvia Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Lithuania%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Lithuania%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Lithuania Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Mexico%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Mexico%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Mexico Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Moldova%20Parliamentary%20Association%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Moldova%20Parliamentary%20Association%20Committee/'> + + Delegation to the EU-Moldova Parliamentary Association Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Montenegro%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Montenegro%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + Delegation to the EU-Montenegro Stabilisation and Association Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Russia%20Parliamentary%20Cooperation%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Russia%20Parliamentary%20Cooperation%20Committee/'> + + Delegation to the EU-Russia Parliamentary Cooperation Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Serbia%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Serbia%20Stabilisation%20and%20Association%20Parliamentary%20Committee/'> + + Delegation to the EU-Serbia Stabilisation and Association Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Slovenia%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Slovenia%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Slovenia Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Sweden%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Sweden%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Sweden Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Turkey%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Turkey%20Joint%20Parliamentary%20Committee/'> + + Delegation to the EU-Turkey Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Ukraine%20Parliamentary%20Association%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20EU-Ukraine%20Parliamentary%20Association%20Committee/'> + + Delegation to the EU-Ukraine Parliamentary Association Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Euro-Latin%20American%20Parliamentary%20Assembly/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Euro-Latin%20American%20Parliamentary%20Assembly/'> + + Delegation to the Euro-Latin American Parliamentary Assembly + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Euronest%20Parliamentary%20Assembly/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Euronest%20Parliamentary%20Assembly/'> + + Delegation to the Euronest Parliamentary Assembly + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20European%20Economic%20Area%20Joint%20Parliamentary%20Committee/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20European%20Economic%20Area%20Joint%20Parliamentary%20Committee/'> + + Delegation to the European Economic Area Joint Parliamentary Committee + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20European%20Economic%20Area%20Joint%20Parliamentary%20Committee%20(EEA)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20European%20Economic%20Area%20Joint%20Parliamentary%20Committee%20(EEA)/'> + + Delegation to the European Economic Area Joint Parliamentary Committee (EEA) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Parliamentary%20Assembly%20of%20the%20Union%20for%20the%20Mediterranean/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegation%20to%20the%20Parliamentary%20Assembly%20of%20the%20Union%20for%20the%20Mediterranean/'> + + Delegation to the Parliamentary Assembly of the Union for the Mediterranean + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20and%20delegations%20for%20relations%20with%20Kazakhstan,%20Kyrgyzstan,%20Uzbekistan,%20Tajikistan,%20Turkmenistan%20and%20Mongolia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20and%20delegations%20for%20relations%20with%20Kazakhstan,%20Kyrgyzstan,%20Uzbekistan,%20Tajikistan,%20Turkmenistan%20and%20Mongolia/'> + + Delegations to the parliamentary cooperation committees and delegations for relations with Kazakhstan, Kyrgyzstan, Uzbekistan, Tajikistan, Turkmenistan and Mongolia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20and%20delegations%20for%20relations%20with%20Ukraine,%20Belarus%20and%20Moldova/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20and%20delegations%20for%20relations%20with%20Ukraine,%20Belarus%20and%20Moldova/'> + + Delegations to the parliamentary cooperation committees and delegations for relations with Ukraine, Belarus and Moldova + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20for%20relations%20with%20Armenia,%20Azerbaijan%20and%20Georgia/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Delegations%20to%20the%20parliamentary%20cooperation%20committees%20for%20relations%20with%20Armenia,%20Azerbaijan%20and%20Georgia/'> + + Delegations to the parliamentary cooperation committees for relations with Armenia, Azerbaijan and Georgia + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Members%20from%20the%20European%20Parliament%20to%20the%20Joint%20Assembly%20of%20the%20Agreement%20between%20the%20African,%20Caribbean%20and%20Pacific%20States%20and%20the%20European%20Union%20(ACP-EU)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Members%20from%20the%20European%20Parliament%20to%20the%20Joint%20Assembly%20of%20the%20Agreement%20between%20the%20African,%20Caribbean%20and%20Pacific%20States%20and%20the%20European%20Union%20(ACP-EU)/'> + + Members from the European Parliament to the Joint Assembly of the Agreement between the African, Caribbean and Pacific States and the European Union (ACP-EU) + + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Members%20from%20the%20European%20Parliament%20to%20the%20Joint%20Parliamentary%20Assembly%20of%20the%20Agreement%20between%20the%20African,%20Caribbean%20and%20Pacific%20States%20and%20the%20European%20Union%20(ACP-EU)/'> + + </a> + </td> + <td> + <a href='/legislature/representative/delegation/European%20Parliament/Members%20from%20the%20European%20Parliament%20to%20the%20Joint%20Parliamentary%20Assembly%20of%20the%20Agreement%20between%20the%20African,%20Caribbean%20and%20Pacific%20States%20and%20the%20European%20Union%20(ACP-EU)/'> + + Members from the European Parliament to the Joint Parliamentary Assembly of the Agreement between the African, Caribbean and Pacific States and the European Union (ACP-EU) + + + </a> + </td> + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/GroupListTest.test_parties/content b/memopol/tests/response_fixtures/GroupListTest.test_parties/content new file mode 100644 index 0000000000000000000000000000000000000000..7893458cd7b596607655363880eb2bae40019423 --- /dev/null +++ b/memopol/tests/response_fixtures/GroupListTest.test_parties/content @@ -0,0 +1,657 @@ +<!DOCTYPE html> +<html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8" /> + <link rel="icon" type="image/png" href="/static/collected/img/favicon.ico" /> + <!-- Set the viewport width to device width for mobile --> + <meta name="viewport" content="width=device-width" /> + <title> + Home + - The Political Memory of </title> + + + <link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" /> + <script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script> +<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script> + + </head> + <body > + <!-- -load memopol_tags cache --> + + + + +<div id='header' class='container-fluid'> + <a id='logo' href='/'> + <img src='/static/collected/images/logo.png' /> + </a> + <h1> + <a id='header_banner' href='/'> + Political Memory + </a> + </h1> + <p class='organization'> + + + </p> +</div> +<div id='nav' class='container-fluid'> + <ul class='nav'> + <li> + <a href='/legislature/representative/'> + Representatives + </a> + </li> + <li> + <a href='/legislature/group/country/'> + Countries + </a> + </li> + <li> + <a href='/legislature/group/chamber/'> + Chambers + </a> + </li> + <li> + <a href='/legislature/group/group/'> + Parties + </a> + </li> + <li> + <a href='/legislature/group/delegation/'> + Delegations + </a> + </li> + <li> + <a href='/legislature/group/committee/'> + Committees + </a> + </li> + <li> + <a href='/votes/dossier/'> + Dossiers + + </a> + </li> + </ul> +</div> + + <div class="container-fluid main-container"> + + <table class='table'> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left/'> + + GUE/NGL + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left/'> + + <span class="group-icon group-icon-guengl"></span> Confederal Group of the European United Left + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'> + + GUE/NGL + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Confederal%20Group%20of%20the%20European%20United%20Left%20-%20Nordic%20Green%20Left/'> + + <span class="group-icon group-icon-guengl"></span> Confederal Group of the European United Left - Nordic Green Left + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20Freedom%20and%20Direct%20Democracy%20Group/'> + + EFDD + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20Freedom%20and%20Direct%20Democracy%20Group/'> + + <span class="group-icon group-icon-efdd"></span> Europe of Freedom and Direct Democracy Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20Nations%20and%20Freedom%20Group/'> + + ENF + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20Nations%20and%20Freedom%20Group/'> + + <span class="group-icon group-icon-enf"></span> Europe of Nations and Freedom Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20freedom%20and%20democracy%20Group/'> + + EFD + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Europe%20of%20freedom%20and%20democracy%20Group/'> + + <span class="group-icon group-icon-efd"></span> Europe of freedom and democracy Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/European%20Conservatives%20and%20Reformists%20Group/'> + + ECR + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/European%20Conservatives%20and%20Reformists%20Group/'> + + <span class="group-icon group-icon-ecr"></span> European Conservatives and Reformists Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20Union%20for%20Europe/'> + + UFE + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20Union%20for%20Europe/'> + + <span class="group-icon group-icon-ufe"></span> Group Union for Europe + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20for%20a%20Europe%20of%20Democracies%20and%20Diversities/'> + + EDD + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20for%20a%20Europe%20of%20Democracies%20and%20Diversities/'> + + <span class="group-icon group-icon-edd"></span> Group for a Europe of Democracies and Diversities + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20Independents%20for%20a%20Europe%20of%20Nations/'> + + ER + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20Independents%20for%20a%20Europe%20of%20Nations/'> + + <span class="group-icon group-icon-er"></span> Group of Independents for a Europe of Nations + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + + ALDE + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Alliance%20of%20Liberals%20and%20Democrats%20for%20Europe/'> + + <span class="group-icon group-icon-alde"></span> Group of the Alliance of Liberals and Democrats for Europe + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20Democratic%20Alliance/'> + + EDA + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20Democratic%20Alliance/'> + + <span class="group-icon group-icon-eda"></span> Group of the European Democratic Alliance + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + + EPP + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20People's%20Party%20(Christian%20Democrats)/'> + + <span class="group-icon group-icon-epp"></span> Group of the European People's Party (Christian Democrats) + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20Radical%20Alliance/'> + + ERA + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20European%20Radical%20Alliance/'> + + <span class="group-icon group-icon-era"></span> Group of the European Radical Alliance + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + + Greens/EFA + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Greens/European%20Free%20Alliance/'> + + <span class="group-icon group-icon-greensefa"></span> Group of the Greens/European Free Alliance + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + + SD + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'> + + <span class="group-icon group-icon-sd"></span> Group of the Progressive Alliance of Socialists and Democrats in the European Parliament + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Independence/Democracy%20Group/'> + + IND/DEM + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Independence/Democracy%20Group/'> + + <span class="group-icon group-icon-inddem"></span> Independence/Democracy Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Liberal%20and%20Democratic%20Group/'> + + LD + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Liberal%20and%20Democratic%20Group/'> + + <span class="group-icon group-icon-ld"></span> Liberal and Democratic Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Liberal%20and%20Democratic%20Reformist%20Group/'> + + LDR + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Liberal%20and%20Democratic%20Reformist%20Group/'> + + <span class="group-icon group-icon-ldr"></span> Liberal and Democratic Reformist Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Non-attached%20Members/'> + + NI + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Non-attached%20Members/'> + + <span class="group-icon group-icon-ni"></span> Non-attached Members + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Socialist%20Group/'> + + SOC + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Socialist%20Group/'> + + <span class="group-icon group-icon-soc"></span> Socialist Group + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/The%20Green%20Group%20in%20the%20European%20Parliament/'> + + Greens/EFA + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/The%20Green%20Group%20in%20the%20European%20Parliament/'> + + <span class="group-icon group-icon-greensefa"></span> The Green Group in the European Parliament + + </a> + </td> + </tr> + + <tr> + + <td> + <a href='/legislature/representative/chamber/European%20Parliament/'> + <span class="chamber-icon chamber-icon-ep"></span> European Parliament + + </a> + </td> + + <td> + <a href='/legislature/representative/group/European%20Parliament/Union%20for%20Europe%20of%20the%20Nations%20Group/'> + + UEN + + </a> + </td> + <td> + <a href='/legislature/representative/group/European%20Parliament/Union%20for%20Europe%20of%20the%20Nations%20Group/'> + + <span class="group-icon group-icon-uen"></span> Union for Europe of the Nations Group + + </a> + </td> + </tr> + + </table> + + </div> + + +<div id='footer' class='container-fluid'> + + Memopol is free software + <a href="https://github.com/political-memory/political_memory">released</a> + under the terms of the + <a href="http://www.gnu.org/licenses/agpl.html">GNU aGPLV3+</a> + + <a href='https://github.com/political-memory/political_memory/issues'> + Bug tracking system + </a> + <a href='https://github.com/political-memory/political_memory/issues/new'> + Report a bug + </a> + <br /> + Provided by <a href="http://www.laquadrature.net/">La Quadrature du Net</a> + +</div> + + </body> +</html> diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content index 3506bfbbc4e514aa17043e1e0d2ebdf040096244..f2b7e7dd01cb3363ba5941aacc5df1b54a0c61cf 100644 --- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content +++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content @@ -43,27 +43,27 @@ </a> </li> <li> - <a href='/legislature/groups/country/'> + <a href='/legislature/group/country/'> Countries </a> </li> <li> - <a href='/legislature/groups/chamber/'> + <a href='/legislature/group/chamber/'> Chambers </a> </li> <li> - <a href='/legislature/groups/group/'> + <a href='/legislature/group/group/'> Parties </a> </li> <li> - <a href='/legislature/groups/delegation/'> + <a href='/legislature/group/delegation/'> Delegations </a> </li> <li> - <a href='/legislature/groups/committee/'> + <a href='/legislature/group/committee/'> Committees </a> </li> diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content index 9daa5bb9a7581e1996bd1d15d4db530b40d2fe4f..9348085d2438686e2500efacc244870578b546ce 100644 --- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content +++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content @@ -43,27 +43,27 @@ </a> </li> <li> - <a href='/legislature/groups/country/'> + <a href='/legislature/group/country/'> Countries </a> </li> <li> - <a href='/legislature/groups/chamber/'> + <a href='/legislature/group/chamber/'> Chambers </a> </li> <li> - <a href='/legislature/groups/group/'> + <a href='/legislature/group/group/'> Parties </a> </li> <li> - <a href='/legislature/groups/delegation/'> + <a href='/legislature/group/delegation/'> Delegations </a> </li> <li> - <a href='/legislature/groups/committee/'> + <a href='/legislature/group/committee/'> Committees </a> </li> diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content index e9bc516136ed72fa83bfd86dc62a3271c9c8272a..9e22cc9f0f3acb30f86306bacc36f4ca5b3d1b98 100644 --- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content +++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content @@ -43,27 +43,27 @@ </a> </li> <li> - <a href='/legislature/groups/country/'> + <a href='/legislature/group/country/'> Countries </a> </li> <li> - <a href='/legislature/groups/chamber/'> + <a href='/legislature/group/chamber/'> Chambers </a> </li> <li> - <a href='/legislature/groups/group/'> + <a href='/legislature/group/group/'> Parties </a> </li> <li> - <a href='/legislature/groups/delegation/'> + <a href='/legislature/group/delegation/'> Delegations </a> </li> <li> - <a href='/legislature/groups/committee/'> + <a href='/legislature/group/committee/'> Committees </a> </li> diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content index 211f4a3cd5495afc116d35c64dc8d5ee653db9ff..e9f36f9331f2d4e4ac972bfef7ff4dd168ff4e44 100644 --- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content +++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content @@ -43,27 +43,27 @@ </a> </li> <li> - <a href='/legislature/groups/country/'> + <a href='/legislature/group/country/'> Countries </a> </li> <li> - <a href='/legislature/groups/chamber/'> + <a href='/legislature/group/chamber/'> Chambers </a> </li> <li> - <a href='/legislature/groups/group/'> + <a href='/legislature/group/group/'> Parties </a> </li> <li> - <a href='/legislature/groups/delegation/'> + <a href='/legislature/group/delegation/'> Delegations </a> </li> <li> - <a href='/legislature/groups/committee/'> + <a href='/legislature/group/committee/'> Committees </a> </li> diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content index 303c9580e9db9caaad56921417ddde0f05f36f17..9de3976c6ab46a0da5d2e823bc8fc44b9369bb72 100644 --- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content +++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content @@ -43,27 +43,27 @@ </a> </li> <li> - <a href='/legislature/groups/country/'> + <a href='/legislature/group/country/'> Countries </a> </li> <li> - <a href='/legislature/groups/chamber/'> + <a href='/legislature/group/chamber/'> Chambers </a> </li> <li> - <a href='/legislature/groups/group/'> + <a href='/legislature/group/group/'> Parties </a> </li> <li> - <a href='/legislature/groups/delegation/'> + <a href='/legislature/group/delegation/'> Delegations </a> </li> <li> - <a href='/legislature/groups/committee/'> + <a href='/legislature/group/committee/'> Committees </a> </li> diff --git a/memopol/tests/test_dossiers.py b/memopol/tests/test_dossiers.py new file mode 100644 index 0000000000000000000000000000000000000000..f87a49fd90b2db98e7e67877f71e97d6b18f1712 --- /dev/null +++ b/memopol/tests/test_dossiers.py @@ -0,0 +1,27 @@ +# -*- coding: utf8 -*- + +from django.test import TestCase + +from representatives_votes.models import Dossier + +from .base import ResponseDiffMixin + + +class DossiersTest(ResponseDiffMixin, TestCase): + fixtures = ['smaller_sample.json'] + + def test_dossier_list(self): + # 1 query for dossier count + # 1 query for dossiers + # 1 query for proposals + # 1 query for recommendations + self.responsediff_test('/votes/dossier/', 4) + + def test_dossier_detail(self): + # Get 1st dossier in dataset + dossier = Dossier.objects.order_by('pk')[0] + + # 1 query for the dossier + # 1 query for proposals + # 1 query for recommendations + self.responsediff_test('/votes/dossier/%s/' % dossier.pk, 3) diff --git a/memopol/tests/test_group_list.py b/memopol/tests/test_group_list.py new file mode 100644 index 0000000000000000000000000000000000000000..ba8d19a4508961ae98bb3ea3cea9f57e16ffe9af --- /dev/null +++ b/memopol/tests/test_group_list.py @@ -0,0 +1,32 @@ +# -*- coding: utf8 -*- + +from django.test import TestCase + +from .base import ResponseDiffMixin + + +class GroupListTest(ResponseDiffMixin, TestCase): + fixtures = ['smaller_sample.json'] + + def group_test(self, kind, numQueries): + self.responsediff_test('/legislature/group/%s/' % kind, numQueries) + + def test_chambers(self): + # 1 query for chambers + self.group_test('chamber', 1) + + def test_country(self): + # 1 query for countries + self.group_test('country', 1) + + def test_parties(self): + # 1 query for political groups + self.group_test('group', 1) + + def test_delegations(self): + # 1 query for delegations + self.group_test('delegation', 1) + + def test_committees(self): + # 1 query for committees + self.group_test('committee', 1) diff --git a/memopol/tests/test_representatives_list.py b/memopol/tests/test_representatives_list.py index f4f3cbb952c2b39e82b96f8b03a61aadced8c235..04f28f38e62127feeb4d7c006b3e9c7f69c2495a 100644 --- a/memopol/tests/test_representatives_list.py +++ b/memopol/tests/test_representatives_list.py @@ -1,15 +1,36 @@ # -*- coding: utf8 -*- + from django.test import TestCase from responsediff.response import Response + from .base import UrlGetTestMixin +from representatives.models import Representative +from ..views.representative_mixin import RepresentativeViewMixin class RepresentativeListTest(UrlGetTestMixin, TestCase): fixtures = ['smaller_sample.json'] url = '/legislature/representative/' + def test_prefetch_profile(self): + test = RepresentativeViewMixin() + reps = test.prefetch_for_representative_country_and_main_mandate( + Representative.objects.order_by('pk')) + + with self.assertNumQueries(2): + # Cast to list to avoid [index] to cast a select with an offset + # below ! + reps = [test.add_representative_country_and_main_mandate(r) + for r in reps] + + assert reps[0].country.code == 'GB' + assert reps[0].main_mandate.pk == 3318 + + assert reps[1].country.code == 'FI' + assert reps[1].main_mandate.pk == 5545 + def functional_test(self, page, paginate_by, display, search=''): url = '%s?page=%s&search=%s' % (self.url, page, search) diff --git a/memopol/urls.py b/memopol/urls.py index 1f5931bca533f24d0ecdef41640cc76ad2eace85..5f6e885fb6f5123cb3022d0f60f568a5c5257b30 100644 --- a/memopol/urls.py +++ b/memopol/urls.py @@ -3,7 +3,14 @@ from django.conf.urls import include, url from django.contrib import admin from django.views import generic -import views +from views.dossier_ac import DossierAutocomplete, ProposalAutocomplete +from views.dossier_detail import DossierDetail +from views.dossier_list import DossierList +from views.group_list import GroupList +from views.representative_detail import RepresentativeDetail +from views.representative_list import RepresentativeList +from views.redirects import RedirectGroupList + import api admin.autodiscover() @@ -13,30 +20,66 @@ urlpatterns = [ url( r'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/' + r'(?P<group>.+)/$', - views.RepresentativeList.as_view(), + RepresentativeList.as_view(), + name='representative-list' ), url( r'^legislature/representative/(?P<group_kind>\w+)/(?P<group>.+)/$', - views.RepresentativeList.as_view(), + RepresentativeList.as_view(), + name='representative-list' + ), + url( + r'^legislature/representative/$', + RepresentativeList.as_view(), + name='representative-list' ), url( r'^legislature/representative/(?P<slug>[-\w]+)/$', - views.RepresentativeDetail.as_view(), + RepresentativeDetail.as_view(), + name='representative-detail' ), url( - r'^legislature/representative/$', - views.RepresentativeList.as_view(), + r'^legislature/group/$', + GroupList.as_view(), + name='group-list' + ), + url( + r'^legislature/groups/$', + RedirectGroupList.as_view(), + name='group-list-redirect' + ), + url( + r'^legislature/group/(?P<kind>\w+)/$', + GroupList.as_view(), + name='group-list' + ), + url( + r'^legislature/groups/(?P<kind>\w+)/$', + RedirectGroupList.as_view(), + name='group-list-redirect' ), url( r'^votes/dossier/$', - views.DossierList.as_view(), + DossierList.as_view(), + name='dossier-list' + ), + url( + r'^votes/dossier/(?P<pk>\d+)/$', + DossierDetail.as_view(), + name='dossier-detail' + ), + url( + r'^votes/autocomplete/dossier/$', + DossierAutocomplete.as_view(), + name='dossier-autocomplete', + ), + url( + r'^votes/autocomplete/proposal/$', + ProposalAutocomplete.as_view(), + name='proposal-autocomplete', ), url(r'^admin/', include(admin.site.urls)), - url(r'^legislature/', include('representatives.urls', - namespace='representatives')), - url(r'^votes/', include('representatives_votes.urls', - namespace='representatives_votes')), url(r'^positions/', include('representatives_positions.urls', namespace='representatives_positions')), url(r'^api/', include(api.router.urls)), diff --git a/memopol/views/__init__.py b/memopol/views/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/memopol/views/dossier_ac.py b/memopol/views/dossier_ac.py new file mode 100644 index 0000000000000000000000000000000000000000..03c8525bb132d26e93c613451b9f5b96369e513f --- /dev/null +++ b/memopol/views/dossier_ac.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +from dal import autocomplete + +from django.db.models import Q + +from representatives_votes.models import Dossier, Proposal + + +class DossierAutocomplete(autocomplete.Select2QuerySetView): + def get_queryset(self): + qs = Dossier.objects.all() + + if self.q: + qs = qs.filter( + Q(title__icontains=self.q) | + Q(reference__icontains=self.q) + ) + + return qs + + +class ProposalAutocomplete(autocomplete.Select2QuerySetView): + def get_queryset(self): + qs = Proposal.objects.all() + + if self.q: + qs = qs.filter( + Q(dossier__title__icontains=self.q) | + Q(title__icontains=self.q) | + Q(reference__icontains=self.q) + ) + + return qs diff --git a/memopol/views/dossier_detail.py b/memopol/views/dossier_detail.py new file mode 100644 index 0000000000000000000000000000000000000000..45482fa25bd1239a6c235fbb7dfc0b0026e7dd56 --- /dev/null +++ b/memopol/views/dossier_detail.py @@ -0,0 +1,13 @@ +# coding: utf-8 + +from django.views import generic + +from representatives_votes.models import Dossier + + +class DossierDetail(generic.DetailView): + + queryset = Dossier.objects.prefetch_related( + 'proposals', + 'proposals__recommendation' + ) diff --git a/memopol/views/dossier_list.py b/memopol/views/dossier_list.py new file mode 100644 index 0000000000000000000000000000000000000000..63335b9997b43a25a4865a306d6875999a9c8f34 --- /dev/null +++ b/memopol/views/dossier_list.py @@ -0,0 +1,18 @@ +# coding: utf-8 + +from core.views import PaginationMixin + +from django.db.models import Count +from django.views import generic + +from representatives_votes.models import Dossier + + +class DossierList(PaginationMixin, generic.ListView): + + queryset = Dossier.objects.prefetch_related( + 'proposals', + 'proposals__recommendation' + ).annotate( + nb_recomm=Count('proposals__recommendation') + ).order_by('-nb_recomm', '-reference') diff --git a/memopol/views/group_list.py b/memopol/views/group_list.py new file mode 100644 index 0000000000000000000000000000000000000000..eb500f71318af3ed03a1dc54fd3ea272c8b7ef41 --- /dev/null +++ b/memopol/views/group_list.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +import datetime + +from django.db import models +from django.views import generic + +from representatives.models import Group + + +class GroupList(generic.ListView): + + def get_queryset(self): + qs = Group.objects.filter( + models.Q(mandates__end_date__gte=datetime.date.today()) | + models.Q(mandates__end_date__isnull=True) + ) + + kind = self.kwargs.get('kind', None) + if kind: + qs = qs.filter(kind=kind).distinct() + + return qs.select_related('chamber').order_by('chamber__name', 'name') diff --git a/memopol/views/redirects.py b/memopol/views/redirects.py new file mode 100644 index 0000000000000000000000000000000000000000..876c7eabd7c83503eb62f1b49b0b1f7ab4d059cb --- /dev/null +++ b/memopol/views/redirects.py @@ -0,0 +1,9 @@ +# coding: utf-8 + +from django.views.generic.base import RedirectView + + +class RedirectGroupList(RedirectView): + permanent = True + query_string = True + pattern_name = 'group-list' diff --git a/memopol/views.py b/memopol/views/representative_detail.py similarity index 50% rename from memopol/views.py rename to memopol/views/representative_detail.py index a3f1e8da23544e01d6197cf2c6e041d2232ab944..7b484e348a785357393b8b3cfba9ed483c4497e8 100644 --- a/memopol/views.py +++ b/memopol/views/representative_detail.py @@ -1,49 +1,27 @@ -# Project specific "glue" coupling of all apps +# coding: utf-8 + from django.db import models -from django.db.models import Count +from django.views import generic -from core.views import GridListMixin, PaginationMixin, CSVDownloadMixin -from representatives import views as representatives_views -from representatives.models import (Representative, Address, Phone, WebSite) -from representatives_votes import views as representatives_votes_views -from representatives_votes.models import Dossier, Proposal +from representatives.models import Representative, Address, Phone, WebSite from representatives_positions.forms import PositionForm from representatives_recommendations.models import VoteScore +from representatives_votes.models import Proposal +from .representative_mixin import RepresentativeViewMixin -class RepresentativeList( - CSVDownloadMixin, - GridListMixin, - PaginationMixin, - representatives_views.RepresentativeList -): - - csv_name = 'meps.csv' - - def get_csv_results(self, context, **kwargs): - qs = super(RepresentativeList, self).get_queryset() - qs = qs.prefetch_related('email_set') - return [self.add_representative_country_and_main_mandate(r) - for r in qs] - - def get_csv_row(self, obj): - return ( - obj.full_name, - u', '.join([e.email for e in obj.email_set.all()]), - obj.main_mandate.group.abbreviation, - obj.country, - ) - - queryset = Representative.objects.filter( - active=True).select_related('score') +class RepresentativeDetail(RepresentativeViewMixin, generic.DetailView): -class RepresentativeDetail(representatives_views.RepresentativeDetail): queryset = Representative.objects.select_related('score') def get_queryset(self): + qs = super(RepresentativeDetail, self).get_queryset() + + qs = self.prefetch_for_representative_country_and_main_mandate(qs) + social = ['twitter', 'facebook'] - qs = super(RepresentativeDetail, self).get_queryset().prefetch_related( + qs = qs.prefetch_related( 'email_set', models.Prefetch( 'website_set', @@ -71,21 +49,21 @@ class RepresentativeDetail(representatives_views.RepresentativeDetail): '-proposal__datetime') ) ) + return qs def get_context_data(self, **kwargs): c = super(RepresentativeDetail, self).get_context_data(**kwargs) + + self.add_representative_country_and_main_mandate(c['object']) + + c['votes'] = c['object'].votes.all() + c['mandates'] = c['object'].mandates.all() + c['positions'] = c['object'].positions.filter( + published=True).prefetch_related('tags') + c['position_form'] = PositionForm( initial={'representative': self.object.pk}) self.add_representative_country_and_main_mandate(c['object']) return c - - -class DossierList(PaginationMixin, representatives_votes_views.DossierList): - queryset = Dossier.objects.prefetch_related( - 'proposals', - 'proposals__recommendation' - ).annotate( - nb_recomm=Count('proposals__recommendation') - ).order_by('-nb_recomm', '-reference') diff --git a/memopol/views/representative_list.py b/memopol/views/representative_list.py new file mode 100644 index 0000000000000000000000000000000000000000..6b034abb13e0ab414716970e68b0028e862e1fac --- /dev/null +++ b/memopol/views/representative_list.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +from core.views import GridListMixin, PaginationMixin, CSVDownloadMixin + +import datetime + +from django.db import models +from django.utils.text import slugify +from django.views import generic + +from representatives.models import Group, Representative + +from .representative_mixin import RepresentativeViewMixin + + +class RepresentativeList(CSVDownloadMixin, GridListMixin, PaginationMixin, + RepresentativeViewMixin, generic.ListView): + + csv_name = 'meps.csv' + queryset = Representative.objects.filter( + active=True).select_related('score') + + def get_context_data(self, **kwargs): + c = super(RepresentativeList, self).get_context_data(**kwargs) + + c['object_list'] = [ + self.add_representative_country_and_main_mandate(r) + for r in c['object_list'] + ] + + return c + + def search_filter(self, qs): + search = self.request.GET.get('search', None) + if search: + qs = qs.filter(slug__icontains=slugify(search)) + return qs + + def group_filter(self, qs): + group_kind = self.kwargs.get('group_kind', None) + chamber = self.kwargs.get('chamber', None) + group = self.kwargs.get('group', None) + today = datetime.date.today() + + if group_kind and group: + if group.isnumeric(): + group_qs = Group.objects.filter( + id=int(group) + ) + else: + group_qs = Group.objects.filter( + name=group, + kind=group_kind + ) + + if chamber: + group_qs = group_qs.filter(chamber__name=chamber) + + qs = qs.filter( + models.Q(mandates__end_date__gte=today) | + models.Q(mandates__end_date__isnull=True), + mandates__group__in=group_qs + ) + + return qs + + def get_queryset(self): + qs = super(RepresentativeList, self).get_queryset() + qs = self.group_filter(qs) + qs = self.search_filter(qs) + qs = self.prefetch_for_representative_country_and_main_mandate(qs) + return qs + + def get_csv_results(self, context, **kwargs): + qs = super(RepresentativeList, self).get_queryset() + qs = qs.prefetch_related('email_set') + return [self.add_representative_country_and_main_mandate(r) + for r in qs] + + def get_csv_row(self, obj): + return ( + obj.full_name, + u', '.join([e.email for e in obj.email_set.all()]), + obj.main_mandate.group.abbreviation, + obj.country, + ) diff --git a/memopol/views/representative_mixin.py b/memopol/views/representative_mixin.py new file mode 100644 index 0000000000000000000000000000000000000000..98b27d40413a84fe9e906386b131f93c219224a2 --- /dev/null +++ b/memopol/views/representative_mixin.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +import datetime + +from django.db import models + +from representatives.models import Mandate + + +class RepresentativeViewMixin(object): + """ + A view mixin to add pre-fetched main_mandate and country to Representative + + If a Representative was fetched from a QuerySet that have been through + prefetch_for_representative_country_and_main_mandate(), then + add_representative_country_and_main_mandate(representative) adds the + ``.country`` and ``.main_mandate`` properties "for free" - the prefetch + methods adds an extra query, but gets all. + """ + + def prefetch_for_representative_country_and_main_mandate(self, queryset): + """ + Prefetch Mandates with their Group and Constituency with Country. + """ + mandates = Mandate.objects.order_by( + '-end_date').select_related('constituency__country', 'group', + 'group__chamber') + return queryset.prefetch_related( + models.Prefetch('mandates', queryset=mandates)) + + def add_representative_country_and_main_mandate(self, representative): + """ + Set representative country, main_mandate and chamber. + + Note that this will butcher your database if you don't use + self.prefetch_related. + """ + today = datetime.date.today() + + representative.country = None + representative.main_mandate = None + + for m in representative.mandates.all(): + if m.constituency.country_id and not representative.country: + representative.country = m.constituency.country + + if ((m.end_date is None or m.end_date > today) and + m.group.kind == 'group' and + not representative.main_mandate): + + representative.main_mandate = m + + if representative.country and representative.main_mandate: + break + + if representative.main_mandate: + representative.chamber = representative.main_mandate.group.chamber + + return representative diff --git a/representatives_positions/tests/test_functional.py b/representatives_positions/tests/test_functional.py index 2925229f743ce2814b76427f01c99c166b853370..f134e41c7e1405191b295cf9f293f6bc46ab4f24 100644 --- a/representatives_positions/tests/test_functional.py +++ b/representatives_positions/tests/test_functional.py @@ -29,7 +29,8 @@ class PositionTest(TestCase): def test_create_position(self): response = self.client.post(self.create_url, self.fixture) assert response.status_code == 302 - expected = 'http://testserver%s' % self.mep.get_absolute_url() + mep_url = reverse('representative-detail', args=(self.mep.slug,)) + expected = 'http://testserver%s' % mep_url assert response['Location'] == expected result = Position.objects.get(text='%stext' % self.id()) diff --git a/representatives_positions/views.py b/representatives_positions/views.py index 3b24ef11c15ee4198e366987c8fe8fd2b43a68f8..4d7d2df10fe395618a3f81da521d8e2aa947baf0 100644 --- a/representatives_positions/views.py +++ b/representatives_positions/views.py @@ -1,7 +1,8 @@ from django.views import generic from django.db import models +from django.core.urlresolvers import reverse -from representatives.views import RepresentativeViewMixin +from memopol.views.representative_mixin import RepresentativeViewMixin from representatives.models import Mandate from .models import Position @@ -13,7 +14,8 @@ class PositionCreate(generic.CreateView): form_class = PositionForm def get_success_url(self): - return self.object.representative.get_absolute_url() + return reverse('representative-detail', + args=(self.object.representative.slug,)) class PositionDetail(RepresentativeViewMixin, generic.DetailView): diff --git a/representatives_recommendations/forms.py b/representatives_recommendations/forms.py index abd23a473bce5a7637e58fe9abe59f5b6dd3d339..56304834264b5f4cb9591b0db1ba53d62f0aa09e 100644 --- a/representatives_recommendations/forms.py +++ b/representatives_recommendations/forms.py @@ -11,6 +11,6 @@ class RecommendationForm(forms.ModelForm): fields = '__all__' widgets = { 'proposal': autocomplete.ModelSelect2( - url='representatives_votes:proposal-autocomplete', + url='proposal-autocomplete', ) } diff --git a/setup.py b/setup.py index 307e63f398ecf44200400bb92c863733eb7e5434..dc9f6eaeca16d272d77c98069f4e6b87afee3117 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,8 @@ setup(name='political-memory', 'django-compressor>=1.6,<1.7', 'django-datetime-widget>=0.9,<1.0', 'django-filter>=0.11,<0.12', - 'django-representatives-votes==0.0.15', - 'django-representatives==0.0.21', + 'django-representatives-votes==0.0.16', + 'django-representatives==0.0.22', 'django-taggit>=0.17,<0.18', 'django>=1.8,<1.9', 'djangorestframework>=3.2.0,<3.3.0', diff --git a/templates/_header.haml b/templates/_header.haml index b0dd05f50be6b3e5312f7b7f1773c39a8ec85b55..ae7cb83a63def82d26603a96e598aadd632d597b 100644 --- a/templates/_header.haml +++ b/templates/_header.haml @@ -15,23 +15,23 @@ #nav.container-fluid %ul.nav %li - %a{href: "{% url 'representatives:representative-list' %}"} + %a{href: "{% url 'representative-list' %}"} - trans 'Representatives' %li - %a{href: "{% url 'representatives:group-list' kind='country' %}"} + %a{href: "{% url 'group-list' kind='country' %}"} - trans 'Countries' %li - %a{href: "{% url 'representatives:group-list' kind='chamber' %}"} + %a{href: "{% url 'group-list' kind='chamber' %}"} - trans 'Chambers' %li - %a{href: "{% url 'representatives:group-list' kind='group' %}"} + %a{href: "{% url 'group-list' kind='group' %}"} - trans 'Parties' %li - %a{href: "{% url 'representatives:group-list' kind='delegation' %}"} + %a{href: "{% url 'group-list' kind='delegation' %}"} - trans 'Delegations' %li - %a{href: "{% url 'representatives:group-list' kind='committee' %}"} + %a{href: "{% url 'group-list' kind='committee' %}"} - trans 'Committees' %li - %a{href: "{% url 'representatives_votes:dossier-list' %}"} + %a{href: "{% url 'dossier-list' %}"} - trans 'Dossiers' diff --git a/templates/home.haml b/templates/home.haml index 9a9ad928bf25c1ffd0a5540d85bb68c6d7fb5fa9..bd263ed27c0a03121da986caf92b601e134c739a 100644 --- a/templates/home.haml +++ b/templates/home.haml @@ -5,7 +5,7 @@ %p Memopol is reachable only in <b>reduced functionality mode</b>. By the way, you could access to - <a href="{% url 'representatives:representative-list' %}">the list of MEPs</a>. + <a href="{% url 'representative-list' %}">the list of MEPs</a>. %p You can help on building the new Memopol by <a href="https://wiki.laquadrature.net/Projects/Memopol/Roadmap">coding, translating, de signing, funding, etc...</a>. .col-md-4 diff --git a/templates/representatives/_representative_block.haml b/templates/representatives/_representative_block.haml index ca5797bfc955a15594563aeb1a86e3d2ca86d7de..429e2834d4cbcecd8b0bf3e2927a89243ff5ddfb 100644 --- a/templates/representatives/_representative_block.haml +++ b/templates/representatives/_representative_block.haml @@ -22,17 +22,17 @@ %tr %th Chamber %td< - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + %a{'href': "{% chamber_url representative.chamber %}"} = representative.chamber|chamber_icon %tr %th Country %td< - %a{:href => "{{ representative.country.get_absolute_url }}"} + %a{:href => "{% country_url representative.country %}"} = representative.country|country_flag %tr %th Party %td< - %a{:href => "{{ representative.main_mandate.group.get_absolute_url }}"} + %a{:href => "{% group_url representative.main_mandate.group %}"} = representative.main_mandate|mandate_icon %tr %th Biography diff --git a/templates/representatives/group_list.haml b/templates/representatives/group_list.haml index 0e41d42f83e615555c9b666e38fe36e604fbc42f..b009e463d3f87401c0728ae5727688e741d691c0 100644 --- a/templates/representatives/group_list.haml +++ b/templates/representatives/group_list.haml @@ -1,22 +1,24 @@ - extends 'base.html' +- load memopol_tags - load representatives_tags + - block content %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 %}"} + %a{'href': "{% chamber_url group.chamber %}"} = group.chamber|chamber_icon %td - %a{'href': '{{ group.get_absolute_url }}'} + %a{'href': "{% group_url group %}"} - if group.abbreviation ={group.abbreviation} %td - %a{'href': '{{ group.get_absolute_url }}'}= + %a{'href': "{% group_url group %}"}= - if group.kind == 'chamber' = group|chamber_icon - elif group.kind == 'group' diff --git a/templates/representatives/representative_detail.haml b/templates/representatives/representative_detail.haml index 8d3214cd1112374c29d72746aa99270f4002a036..d2818765bc82021a7a624903089f6ed6dd23e4ee 100644 --- a/templates/representatives/representative_detail.haml +++ b/templates/representatives/representative_detail.haml @@ -1,6 +1,7 @@ - extends 'base.html' - load humanize +- load memopol_tags - load representatives_tags - load representatives_votes_tags - load representatives_recommendations_tags @@ -48,7 +49,7 @@ %tr.mandate %td= mandate.role %td - %a{:href => "{{ mandate.group.get_absolute_url }}"} + %a{:href => "{% group_url mandate.group %}"} {{ mandate.group.name }} - if mandate.group.abbreviation {{ mandate.group.abbreviation }} @@ -75,7 +76,7 @@ %span.label.label-default = tag %td - %a{:href => '{{position.link}}'} + %a{:href => '{{ position.link }}'} = position.link - include 'representatives_positions/_form.html' with form=position_form diff --git a/templates/representatives/representative_grid.haml b/templates/representatives/representative_grid.haml index f9270e0e54cdd2d27b526a7c185c1c0df02f6c18..bc50ad49a8fc9b364edec25111f07aff128a4b37 100644 --- a/templates/representatives/representative_grid.haml +++ b/templates/representatives/representative_grid.haml @@ -1,5 +1,6 @@ - extends 'representatives/representative_list.html' +- load memopol_tags - load representatives_tags - load representatives_recommendations_tags @@ -9,20 +10,20 @@ - for representative in object_list .representative_item %p.photo - %a{'href': "{{ representative.get_absolute_url }}"} + %a{'href': "{% url 'representative-detail' representative.slug %}"} %img{'src': '={representative.photo}', 'width': '80'}/ %ul %li.name - %a{'href': "{{ representative.get_absolute_url }}"} + %a{'href': "{% url 'representative-detail' representative.slug %}"} = representative.full_name %li.chamber - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + %a{'href': "{% chamber_url representative.chamber %}"} = representative.chamber|chamber_icon %li.country - %a{'href': "{{ representative.country.get_absolute_url }}"} + %a{'href': "{% country_url representative.country %}"} = representative.country|country_flag %li.mandate - %a{'href': "{{ representative.main_mandate.group.get_absolute_url }}"} + %a{'href': "{% group_url representative.main_mandate.group %}"} = representative.main_mandate.group|group_icon %li.score = representative.score.score|score_label diff --git a/templates/representatives/representative_list.haml b/templates/representatives/representative_list.haml index 5a6c2993eacfb46a3f8c097762f4631bf52d3a6e..af5c96213594481130d88492b830b55c8440ac92 100644 --- a/templates/representatives/representative_list.haml +++ b/templates/representatives/representative_list.haml @@ -1,6 +1,7 @@ - extends 'base.html' - load i18n +- load memopol_tags - load representatives_tags - load representatives_recommendations_tags @@ -39,23 +40,23 @@ - for representative in object_list %tr %td - %a{'href': "{{ representative.get_absolute_url }}"} + %a{'href': "{% url 'representative-detail' representative.slug %}"} %img{'src': '={representative.photo}', 'width': '80'}/ %td - %a{'href': "{{ representative.get_absolute_url }}"} + %a{'href': "{% url 'representative-detail' representative.slug %}"} = representative.full_name %td - %a{'href': "{% url 'representatives:representative-list' group_kind='chamber' group=representative.chamber.name %}"} + %a{'href': "{% chamber_url representative.chamber %}"} = representative.chamber %td - %a{'href': "{{ representative.country.get_absolute_url }}"} + %a{'href': "{% country_url representative.country %}"} = representative.country %td - %a{'href': "{{ representative.main_mandate.group.get_absolute_url }}"} + %a{'href': "{% group_url representative.main_mandate.group %}"} = representative.main_mandate.group|group_icon %td = representative.score.score|score_label diff --git a/templates/representatives_votes/dossier_list.haml b/templates/representatives_votes/dossier_list.haml index 15d1bab16e7fd11dfc5fd64a433507e98c4d2224..4bc5df7eb54cf04310e8559f19db5dbf301ca47f 100644 --- a/templates/representatives_votes/dossier_list.haml +++ b/templates/representatives_votes/dossier_list.haml @@ -17,7 +17,7 @@ - for dossier in object_list %tr %td - %a{'href': "{{ dossier.get_absolute_url }}"} + %a{'href': "{% url 'dossier-detail' dossier.pk %}"} {{ dossier.title }} %td= dossier.nb_recomm %td= dossier.reference