From d8b63bc2d29edbaa5223f314a8f3c48816bc3cb2 Mon Sep 17 00:00:00 2001 From: Sym Roe Date: Mon, 1 Jul 2024 12:11:44 +0100 Subject: [PATCH] Initial "layers of state" app --- wcivf/apps/administrations/constants.py | 118 ++++++++++ wcivf/apps/administrations/helpers.py | 215 ++++++++++++++++-- .../administrations_for_postcode.html | 48 ++++ .../responsibilities/org_id/WMCA.html | 0 .../responsibilities/org_id/parl-hoc.html | 14 ++ .../responsibilities/post_type/CED.html | 17 ++ .../responsibilities/post_type/DIW.html | 15 ++ .../responsibilities/post_type/GLA_A.html | 0 .../responsibilities/post_type/GLA_C.html | 13 ++ .../responsibilities/post_type/LBW.html | 7 + .../responsibilities/post_type/LGE.html | 16 ++ .../responsibilities/post_type/MTW.html | 13 ++ .../responsibilities/post_type/NIE.html | 13 ++ .../responsibilities/post_type/PCC.html | 15 ++ .../responsibilities/post_type/SPC.html | 0 .../responsibilities/post_type/SPE.html | 11 + .../responsibilities/post_type/UTW.html | 23 ++ .../responsibilities/post_type/WAC.html | 0 .../responsibilities/post_type/WAE.html | 15 ++ .../single_id/O::BDF::mayor.html | 13 ++ .../single_id/O::CPCA::mayor.html | 16 ++ .../single_id/O::CRY::mayor.html | 15 ++ .../single_id/O::DNC::mayor.html | 18 ++ .../single_id/O::EMCA::mayor.html | 18 ++ .../single_id/O::GMCA::mayor.html | 23 ++ .../single_id/O::HCK::mayor.html | 11 + .../single_id/O::LCE::mayor.html | 12 + .../single_id/O::LCR::mayor.html | 26 +++ .../single_id/O::LEW::mayor.html | 22 ++ .../single_id/O::MAS::mayor.html | 13 ++ .../single_id/O::MDB::mayor.html | 12 + .../single_id/O::NEMC::mayor.html | 21 ++ .../single_id/O::NTY::mayor.html | 19 ++ .../single_id/O::NWM::mayor.html | 11 + .../single_id/O::SCR::mayor.html | 15 ++ .../single_id/O::SLF::mayor.html | 15 ++ .../single_id/O::TVCA::mayor.html | 20 ++ .../single_id/O::TWH::mayor.html | 28 +++ .../single_id/O::WAT::mayor.html | 19 ++ .../single_id/O::WECA::mayor.html | 10 + .../single_id/O::YNYC::mayor.html | 23 ++ .../single_id/O::london::mayor.html | 22 ++ .../single_id/O::north-of-tyne::mayor.html | 8 + .../single_id/O::west-yorkshire::mayor.html | 18 ++ wcivf/apps/administrations/tests.py | 1 - .../tests/test_admistration_object.py | 14 ++ .../templates/elections/postcode_view.html | 113 +++++++-- wcivf/apps/elections/views/postcode_view.py | 8 +- wcivf/settings/base.py | 1 + 49 files changed, 1078 insertions(+), 40 deletions(-) create mode 100644 wcivf/apps/administrations/constants.py create mode 100644 wcivf/apps/administrations/templates/administrations/administrations_for_postcode.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/org_id/WMCA.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/org_id/parl-hoc.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/CED.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/DIW.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/GLA_A.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/GLA_C.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/LBW.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/LGE.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/MTW.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/NIE.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/PCC.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/SPC.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/SPE.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/UTW.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/WAC.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/post_type/WAE.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::BDF::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::CPCA::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::CRY::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::DNC::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::EMCA::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::GMCA::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::HCK::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::LCE::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::LCR::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::LEW::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::MAS::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::MDB::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::NEMC::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::NTY::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::NWM::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::SCR::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::SLF::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::TVCA::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::TWH::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::WAT::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::WECA::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::YNYC::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::london::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::north-of-tyne::mayor.html create mode 100644 wcivf/apps/administrations/templates/responsibilities/single_id/O::west-yorkshire::mayor.html delete mode 100644 wcivf/apps/administrations/tests.py create mode 100644 wcivf/apps/administrations/tests/test_admistration_object.py diff --git a/wcivf/apps/administrations/constants.py b/wcivf/apps/administrations/constants.py new file mode 100644 index 000000000..ea14477ff --- /dev/null +++ b/wcivf/apps/administrations/constants.py @@ -0,0 +1,118 @@ +from enum import Enum + +WEIGHT_MAP = { + "parl": -100, + "mayor": -50, + "local-authority": 0, + "gla": 50, + "senedd": 50, + "pcc": 100, +} + + +class PostTypes(Enum): + GLA_A = "GLA_A" # GLA additional + GLA_C = "GLA_C" # GLA constituencies + LONDON_ALDERMAN = "LONDON_ALDERMAN" # Who knows + DIW = "DIW" # District ward + MTW = "MTW" # Metropolitan district ward + CED = "CED" # Council ward + UTW = "UTE" # Unitary Authority ward + UTE = "UTE" # Unitary Authority electoral division + LBW = "LBW" # London before Wicket + MAYOR = "MAYOR" # TODO: do we need CA Mayor too? + WMC = "WMC" # Westminster constituency + SPC = "SPC" # Scottish Parliament constituency + SPE = "SPE" # Scottish Parliament region + WAC = "WAC" # Welsh Assembly constituency + WAE = "WAE" # Welsh Assembly region + PCC = "PCC" # Police and Crime Commissioner + PFCC = "PFCC" # Police, Fire and Crime Commissioner + LGE = "LGE" # Northern Irish Council electoral area + NIE = "NIE" # Northern Ireland Assembly constituency + + @classmethod + def from_administration_data(cls, data): + if data["organisation"]["official_identifier"] == "gla": + if data["subtype"]["election_subtype"] == "a": + return cls.GLA_A + if data["subtype"]["election_subtype"] == "c": + return cls.GLA_C + + if division := data.get("division", None): + division_type = division["division_type"] + if value := getattr(cls, division_type.upper(), None): + return value + + if data["organisation"]["organisation_type"] == "police-area": + if "fire" in data["elected_title"]: + return cls.PFCC + return cls.PCC + + if data.get("election_type", {}).get("election_type") == "mayor": + return cls.MAYOR + + return None + + +POST_TYPE_TO_NAME = { + PostTypes.LONDON_ALDERMAN: ("Alderman",), + PostTypes.GLA_C: ("Assembly Member", "Assembly Members"), + PostTypes.GLA_A: ( + "Assembly Member (additional)", + "Assembly Members (additional)", + ), + PostTypes.NIE: ( + "member of the Legislative Assembly", + "members of the Legislative Assembly", + ), + PostTypes.DIW: ("local Councillor", "local Councillors"), + PostTypes.LBW: ("local Councillor", "local Councillors"), + PostTypes.MTW: ("local Councillor", "local Councillors"), + PostTypes.UTW: ("local Councillor", "local Councillors"), + PostTypes.LGE: ("local Councillor", "local Councillors"), + PostTypes.UTE: ("local Councillor", "local Councillors"), + PostTypes.CED: ("County Councillor", "County Councillors"), + PostTypes.MAYOR: ("Mayor",), + PostTypes.WMC: ("member of Parliament",), + PostTypes.SPC: ("member of the Scottish Parliament",), + PostTypes.SPE: ( + "member of the Scottish Parliament", + "members of the Scottish Parliament", + ), + PostTypes.WAC: ("member of the Senedd",), + PostTypes.WAE: ("member of the Senedd",), + PostTypes.PCC: ("Police and Crime Commissioner",), + PostTypes.PFCC: ("Police, Fire and Crime Commissioner",), +} +ORG_ID_TO_MAYOR_NAME = { + "BDF": "Mayor of Bedford", + "BST": "Mayor of Bristol", + "CPCA": "Mayor of Cambridgeshire and Peterborough Combined Authority", + "CRY": "Mayor of Croydon", + "DNC": "Mayor of Doncaster", + "EMCA": "Mayor of East Midlands Combined County Authority", + "GMCA": "Mayor of Greater Manchester Combined Authority", + "HCK": "Mayor of Hackney", + "LCE": "Mayor of Leicester", + "LCR": "Mayor of Liverpool City Region Combined Authority", + "LEW": "Mayor of Lewisham", + "LIV": "Mayor of Liverpool", + "london": "Mayor of London", + "MAS": "Mayor of Mansfield", + "MDB": "Mayor of Middlesbrough", + "NEMC": "Mayor of North East Combined Authority", + "north-of-tyne": "Mayor of North of Tyne Combined Authority", + "NTY": "Mayor of North Tyneside", + "NWM": "Mayor of Newham", + "SCR": "Mayor of Sheffield City Region Combined Authority", + "SLF": "Mayor of Salford", + "TOB": "Mayor of Torbay", + "TVCA": "Mayor of Tees Valley Combined Authority", + "TWH": "Mayor of Tower Hamlets", + "WAT": "Mayor of Watford", + "WECA": "Mayor of West of England Combined Authority", + "west-yorkshire": "Mayor of West Yorkshire Combined Authority", + "WMCA": "Mayor of West Midlands Combined Authority", + "YNYC": "Mayor of York and North Yorkshire Combined Authority", +} diff --git a/wcivf/apps/administrations/helpers.py b/wcivf/apps/administrations/helpers.py index 59390a21c..2196451a1 100644 --- a/wcivf/apps/administrations/helpers.py +++ b/wcivf/apps/administrations/helpers.py @@ -1,14 +1,44 @@ -import json -from pathlib import Path -from typing import Dict, List +from functools import cached_property +from typing import List -BASE_DATA_PATH = Path("/home/symroe/Data/StaticOrgLayer/") +import requests +from administrations.constants import ( + ORG_ID_TO_MAYOR_NAME, + POST_TYPE_TO_NAME, + WEIGHT_MAP, + PostTypes, +) +from core.utils import LastWord +from django.db.models.functions import Coalesce +from django.template.loader import select_template +from elections.models import PostElection + + +def get_weight(id_str, weight_map): + # Split the ID by "::" and check each segment for a key in weight_map + for part in id_str.split("::"): + # If the part contains ":", split by ":" and check the first segment + key = part.split(":")[0] if ":" in part else part + + if key in weight_map: + return weight_map[key] + + # Return a default weight if no key is found + return 0 class Administration: - def __init__(self, admin_id, data: Dict): + def __init__(self, admin_id: str): self.admin_id = admin_id + data = self.load_json(admin_id) self.data = data + self.post_type = PostTypes.from_administration_data(data) + + def load_json(self, administration_id): + req = requests.get( + f"https://s3.eu-west-2.amazonaws.com/ee.public.data/layers-of-state/administrations_json/{self.admin_id}.json" + ) + return req.json() @property def administration_type(self): @@ -21,10 +51,21 @@ def role_type(self): return self.admin_id.split("::")[-1] def friendly_name(self): - org_name = self.data["organisation"]["common_name"] + org_name = self.data["organisation"]["official_name"] + + if self.post_type in [PostTypes.GLA_A, PostTypes.GLA_C]: + return "London Assembly" + + if self.post_type in [PostTypes.WAC, PostTypes.WAE]: + return "Senedd Cymru" + + if self.post_type in [PostTypes.SPC, PostTypes.SPE]: + return "Scottish Parliament" if self.administration_type == "organisation": if self.role_type == "mayor": + if self.data["organisation"]["official_identifier"] == "london": + return "London Assembly" org_name = f"Mayor of {org_name}" return org_name @@ -34,25 +75,161 @@ def friendly_name(self): div_name = f"{div_name} ward" if self.role_type == "parl": - return f"MP for {div_name}" + return f"{div_name} parliamentary constituency" return f"{org_name}: {div_name}" - def seats_contested(self): ... + def role_name(self): + name = None + + index = 0 + if self.seats_total > 1: + index = -1 + if self.post_type in [PostTypes.GLA_A, PostTypes.SPE]: + index = -1 + role_name = POST_TYPE_TO_NAME.get(self.post_type, [name])[index] + + if self.post_type == PostTypes.MAYOR: + org_id = self.data["organisation"]["official_identifier"] + if org_id in ORG_ID_TO_MAYOR_NAME: + return ORG_ID_TO_MAYOR_NAME[org_id] + + if self.post_type in [ + PostTypes.GLA_C, + PostTypes.WAC, + PostTypes.WAE, + PostTypes.SPE, + PostTypes.SPC, + ]: + role_name = f"{role_name} for {self.data['division']['name']}" + + return role_name + + @cached_property + def seats_total(self): + if "division" in self.data: + return self.data["division"]["seats_total"] + + return 1 - def friendly_description(self): - return "asd" + def responsibilities_template(self): + return select_template( + [ + f"responsibilities/single_id/{self.admin_id}.html", + f"responsibilities/post_type/{self.post_type.name}.html", + f"responsibilities/org_id/{self.data['organisation']['official_identifier']}.html", + f"responsibilities/org_type/{self.data['organisation']['organisation_type']}.html", + ] + ) + + def should_show_people(self): + if self.post_type == PostTypes.GLA_A: + return True + + if self.seats_total == 1: + return True + + if self.ballot_obj.winner_count == self.seats_total: + return True + + return False + + @cached_property + def ballot_obj(self): + ballot_id = self.data.get( + "last_division_election_id", + self.data.get( + "last_org_election_id", + ), + ) + + if self.post_type == PostTypes.GLA_A: + date = ballot_id.split(".")[-1] + ballot_id = f"gla.a.{date}" + + return PostElection.objects.get(ballot_paper_id=ballot_id) + + @cached_property + def elected_people(self): + if not self.should_show_people: + return None + + qs = self.ballot_obj.personpost_set.filter(elected=True).select_related( + "party", "person" + ) + return ( + qs.annotate(last_name=LastWord("person__name")) + .annotate( + name_for_ordering=Coalesce("person__sort_name", "last_name") + ) + .order_by("name_for_ordering", "person__name") + ) + + @cached_property + def weight(self): + weight_modifier = 0 + + org_type = self.data["organisation"]["organisation_type"] + if self.admin_id == "O::london::mayor": + org_type = "gla" + if self.role_type == "mayor": + weight_modifier = -10 + + if self.post_type in [PostTypes.GLA_A, PostTypes.WAE, PostTypes.SPE]: + weight_modifier = 10 + weight = WEIGHT_MAP.get(org_type, 1) + return weight + weight_modifier class AdministrationsHelper: - def __init__(self, administration_ids: List[str]): - self.administration_ids = administration_ids - self.data_path = BASE_DATA_PATH + def __init__(self, postcode: str): + self.postcode = postcode + self.administration_ids = self.lookup_administration_ids(self.postcode) self.administrations: List[Administration] = [] + IGNORE_IDS = [ + "O::LIV::mayor", + "O::TOB::mayor", + "O::BST::mayor", + ] for admin_id in self.administration_ids: - data = self.load_json(admin_id) - self.administrations.append(Administration(admin_id, data)) + if admin_id in IGNORE_IDS: + continue + self.administrations.append(Administration(admin_id)) - def load_json(self, administration_id): - path = self.data_path / f"{administration_id}.json" - with path.open() as f: - return json.load(f) + self.administrations = sorted( + self.administrations, key=lambda admin: admin.weight + ) + + def lookup_administration_ids(self, postcode): + if postcode == "GL5 1NA": + return [ + "D::GLS::2021-05-06::unit_id:42821::local", + "D::STO::2016-04-13::gss:E05010988::local", + "D::parl-hoc::2024-07-04::gss:E14001529::parl", + "O::gloucestershire::pcc", + ] + if postcode == "DG8 8NH": + return [ + "D::DGY::2017-05-04::gss:S13002881::local", + "D::parl-hoc::2024-07-04::gss:S14000073::parl", + "D::sp::2016-04-13::gss:S16000114::sp::c", + "D::sp::2016-04-13::gss:S17000015::sp::r", + ] + if postcode == "SE22 8DJ": + return [ + "D::SWK::2018-05-03::gss:E05011097::local", + "D::gla::2004-12-02::gss:E32000010::gla::c", + "D::parl-hoc::2024-07-04::gss:E14001205::parl", + "O::gla::gla::a", + "O::london::mayor", + ] + + return [] + # TODO: clean up + # req = requests.get( + # f"http://localhost:3000/rpc/get_identifiers_by_postcode?postcode={postcode}" + # ) + # ids = [] + # + # for obj in req.json(): + # ids.append(obj["identifier"]) + # return ids diff --git a/wcivf/apps/administrations/templates/administrations/administrations_for_postcode.html b/wcivf/apps/administrations/templates/administrations/administrations_for_postcode.html new file mode 100644 index 000000000..5603b12f0 --- /dev/null +++ b/wcivf/apps/administrations/templates/administrations/administrations_for_postcode.html @@ -0,0 +1,48 @@ +{% load humanize %} +{% load static %} +
+ {% for administration in administrations.administrations %} +
+ {% ifchanged %} +

{{ administration.friendly_name }}

+ {% endifchanged %} + + +

{{ administration.role_name|capfirst }}

+ + {% if administration.seats_total > 1 %} +

There are {{ administration.seats_total|apnumber }} {{ administration.role_name }} representing you.

+ {% endif %} + {% if administration.should_show_people %} +
    + {% for candidacy in administration.elected_people %} +
  • +
    +

    + {{ candidacy.person.name }} +

    +
    {{ candidacy.party.party_name }}
    +
    +
    + {% if candidacy.person.photo_url %} + Photo of {{ candidacy.person.name }} + {% else %} + + {% endif %} +
    +
  • + {% endfor %} +
+ {% endif %} + {% include administration.responsibilities_template %} +
+ + + + + + {% endfor %} +
diff --git a/wcivf/apps/administrations/templates/responsibilities/org_id/WMCA.html b/wcivf/apps/administrations/templates/responsibilities/org_id/WMCA.html new file mode 100644 index 000000000..e69de29bb diff --git a/wcivf/apps/administrations/templates/responsibilities/org_id/parl-hoc.html b/wcivf/apps/administrations/templates/responsibilities/org_id/parl-hoc.html new file mode 100644 index 000000000..15b8eeaeb --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/org_id/parl-hoc.html @@ -0,0 +1,14 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +Members of Parliament (MPs) represent your interests and concerns in the House of Commons. + +MPs consider and can propose new laws as well as raising issues that matter to you in the House. This includes asking government +ministers questions about current issues including those which affect local constituents. + +MPs split their time between working in Parliament itself, working in the constituency that elected them and working +for their political party. + +[Find out more about MPs](https://www.parliament.uk/about/mps-and-lords/members/mps/) +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/CED.html b/wcivf/apps/administrations/templates/responsibilities/post_type/CED.html new file mode 100644 index 000000000..629119761 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/CED.html @@ -0,0 +1,17 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +County councils are responsible for services across the whole of a county, like: + +* education +* transport +* planning +* fire and public safety +* social care +* libraries +* waste management +* trading standards + +[Understand how your council works](https://www.gov.uk/understand-how-your-council-works) +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/DIW.html b/wcivf/apps/administrations/templates/responsibilities/post_type/DIW.html new file mode 100644 index 000000000..20bb10f66 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/DIW.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +District councils cover a smaller area than county councils. They’re usually responsible for services like: + +* rubbish collection +* recycling +* Council Tax collections +* housing +* planning applications + + +[Understand how your council works](https://www.gov.uk/understand-how-your-council-works) +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/GLA_A.html b/wcivf/apps/administrations/templates/responsibilities/post_type/GLA_A.html new file mode 100644 index 000000000..e69de29bb diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/GLA_C.html b/wcivf/apps/administrations/templates/responsibilities/post_type/GLA_C.html new file mode 100644 index 000000000..cd9e1738c --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/GLA_C.html @@ -0,0 +1,13 @@ + + +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +The Assembly holds the Mayor and Mayoral advisers to account by publicly examining policies and programmes through committee meetings, plenary sessions, site visits and investigations. + +Eleven Assembly Members represent the whole capital and 14 are elected by constituencies + +[Read more about what the London Assembly](https://www.london.gov.uk/who-we-are/what-london-assembly-does/about-london-assembly) + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/LBW.html b/wcivf/apps/administrations/templates/responsibilities/post_type/LBW.html new file mode 100644 index 000000000..47789b114 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/LBW.html @@ -0,0 +1,7 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/LGE.html b/wcivf/apps/administrations/templates/responsibilities/post_type/LGE.html new file mode 100644 index 000000000..7acd2523b --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/LGE.html @@ -0,0 +1,16 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} + +The council is responsible for services like: + +* planning +* waste and recycling services +* leisure and community services +* building control and local economic +* cultural development + +[Understand how your council works](https://www.nidirect.gov.uk/articles/local-councils) + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/MTW.html b/wcivf/apps/administrations/templates/responsibilities/post_type/MTW.html new file mode 100644 index 000000000..0e6088371 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/MTW.html @@ -0,0 +1,13 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +Metropolitan district councils are responsible for services like: + +* schools +* social services +* waste collection +* roads + +[Understand how your council works](https://www.gov.uk/understand-how-your-council-works) +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/NIE.html b/wcivf/apps/administrations/templates/responsibilities/post_type/NIE.html new file mode 100644 index 000000000..d5046bbb9 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/NIE.html @@ -0,0 +1,13 @@ + +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +Members of the Legislative Assembly (MLAs) are elected by, and represent the people of, Northern Ireland. MLAs pass laws and examine policy on transferred matters like health, education, the environment, social work and housing. They scrutinise the work of Ministers and hold Executive (Government) Departments to account. + +Every MLA has an office in their constituency to enable them to provide a constituency service. They meet with constituents, listen to their views and act on their behalf to resolve problems. MLAs can contact relevant bodies and can raise the profile of an issue in the media. They communicate with their constituents by email, telephone, letter and social media. + + +[Read more about your MLAs](https://www.niassembly.gov.uk/about-the-assembly/how-the-assembly-works/about-your-mlas/) + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/PCC.html b/wcivf/apps/administrations/templates/responsibilities/post_type/PCC.html new file mode 100644 index 000000000..ae7596ae0 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/PCC.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +Police and crime commissioners are elected in areas of England and Wales to make sure that local police meet the needs of the community. + +They are responsible for: + +* how your area is policed +* the police budget +* the amount of Council Tax charged for the police +* the information you get about what the local police are doing +* appointing and dismissing the chief constable (the most senior police officer for the area) + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/SPC.html b/wcivf/apps/administrations/templates/responsibilities/post_type/SPC.html new file mode 100644 index 000000000..e69de29bb diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/SPE.html b/wcivf/apps/administrations/templates/responsibilities/post_type/SPE.html new file mode 100644 index 000000000..64e85abda --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/SPE.html @@ -0,0 +1,11 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +MSPs take part in examining and passing Bills (proposed laws). They represent you in the Scottish Parliament and +your local area and they examine the work of the Scottish Government. + +[Read more about your MSPs](https://www.parliament.scot/msps/current-and-previous-msps/search-results?postcode={{ postcode }}) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/UTW.html b/wcivf/apps/administrations/templates/responsibilities/post_type/UTW.html new file mode 100644 index 000000000..9cf77445d --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/UTW.html @@ -0,0 +1,23 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +Unitary authorities are responsible for services like: + +* education +* transport +* planning +* fire and public safety +* social care +* libraries +* waste management +* trading standards +* rubbish collection +* recycling +* Council Tax collections +* housing +* planning applications + + +[Understand how your council works](https://www.gov.uk/understand-how-your-council-works) +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/WAC.html b/wcivf/apps/administrations/templates/responsibilities/post_type/WAC.html new file mode 100644 index 000000000..e69de29bb diff --git a/wcivf/apps/administrations/templates/responsibilities/post_type/WAE.html b/wcivf/apps/administrations/templates/responsibilities/post_type/WAE.html new file mode 100644 index 000000000..d4442ef47 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/post_type/WAE.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +When the Senedd is sitting, Members meet twice a week in the Siambr, the debating chamber, to question Welsh Government Ministers, examine proposed laws, and debate various issues. Members also participate in committees that focus on areas such as health and education, examining laws and government policies that could impact these sectors. These committees are composed of Members reflecting the overall representation of the elected parties. + +Most Members have a local office in their constituency or region, employing staff to assist with constituent enquiries. They hold regular 'surgeries' where the public can meet with their representatives to discuss concerns. Additionally, Members engage with constituents online or over the phone, and visit businesses, schools, and local organisations to gain insight into everyday issues, which they may later address in the Senedd. + + +[Read more about the Senedd](https://senedd.wales/how-we-work/about-members-of-the-senedd/) + +[Find more about your Senedd members](https://senedd.wales/find-a-member-of-the-senedd/?Postcode={{ postcode }}) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::BDF::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::BDF::mayor.html new file mode 100644 index 000000000..65cad3e2b --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::BDF::mayor.html @@ -0,0 +1,13 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The Mayor of Bedford is a directly elected mayor. The Mayor appoints Councillors to his +Executive and is responsible for the majority of Council services. + + +[Find more about the mayor](https://www.bedford.gov.uk/your-council/councillors-and-senior-staff/mayor-bedford-borough) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::CPCA::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::CPCA::mayor.html new file mode 100644 index 000000000..ec3ce54d9 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::CPCA::mayor.html @@ -0,0 +1,16 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The role of the Mayor of Cambridgeshire and Peterborough is to deliver economic prosperity across the region, to +make Cambridgeshire and Peterborough a leading place in the world to live, learn, +work and do business. + +The Mayor oversees a £20 million annual budget devolved from government, and also has devolved powers to spend up to +£800 million on local housing, infrastructure and jobs. + +[Find more about the mayor's role](https://www.northeast-ca.gov.uk/north-of-tyne-ca) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::CRY::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::CRY::mayor.html new file mode 100644 index 000000000..38cd402e5 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::CRY::mayor.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The directly elected Mayor provides leadership and direction to the borough and the Council and has overall +responsibility for council policy and the delivery of services. + +The elected Mayor has a mandate to represent the whole borough and will speak on its behalf locally, regionally, +nationally and internationally. It will be for them to decide how this role will work in practice, within the +boundaries set out in the Council’s Constitution. + +[Find more about the mayor's role](https://www.croydon.gov.uk/council-and-elections/mayors-croydon/elected-mayor-croydon/role-elected-mayor#lgd-guides__title) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::DNC::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::DNC::mayor.html new file mode 100644 index 000000000..285f8e329 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::DNC::mayor.html @@ -0,0 +1,18 @@ + + +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +Doncaster Council is led by an Elected Mayor and Cabinet. The Mayor: + +* is the council's political leader and is elected by Doncaster constituents to serve a four-year term of office. +* has executive powers and is responsible for the effective implementation of council policy and delivering services. +* has nine cabinet members to advise, support and lead on their own specific portfolio. + + +[Find more about the Mayor](https://www.doncaster.gov.uk/mayor/mayor-home) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::EMCA::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::EMCA::mayor.html new file mode 100644 index 000000000..a9573a2bc --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::EMCA::mayor.html @@ -0,0 +1,18 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The Mayor has responsibility for transport, skills and adult education, housing and land, net-zero and economic +development. + +As the Chair of the East Midlands Combined County Authority, the Mayor works with partners across the region and +beyond to deliver transformational change for the East Midlands. + +The Mayor also acts as a champion for the region, influencing Government at a national level to boost growth and +innovation, shape policy and access further funding. + +[Find more about the mayor's role](https://www.eastmidlands-cca.gov.uk/the-mayor/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::GMCA::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::GMCA::mayor.html new file mode 100644 index 000000000..5bfb42418 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::GMCA::mayor.html @@ -0,0 +1,23 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +Accountable to and representing the people of all 10 boroughs in Greater Manchester, the Mayor steers the work of +Greater Manchester’s Combined Authority, focusing on issues such as the economy, transport, police, and fire +services. The Mayor's responsibilities include transforming public services and shaping the region's future while +making the case for Greater Manchester at the heart of government and on the world stage. The Mayor chairs the +Combined Authority, with the leaders of the 10 councils forming the Mayor’s Cabinet, and is supported by a Deputy +Mayor for Policing and Crime, and a Deputy Mayor for Economic Growth and Business. + +The Mayor sets budgets and priorities for Greater Manchester’s public services and acts as an ambassador for the +region. Responsibilities include managing the transport budget from the Government, overseeing the future of bus +services, acting as the public’s voice on policing matters, making strategic decisions about the fire service, and +managing a £300 million housing investment fund. While the Mayor can make some decisions independently, others +require consultation with, and approval from, all 11 members of the Greater Manchester Combined Authority, with some +decisions needing unanimous support and others requiring a majority. + +[Find more about the mayor's role](https://www.greatermanchester-ca.gov.uk/the-mayor/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::HCK::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::HCK::mayor.html new file mode 100644 index 000000000..0ecc9760d --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::HCK::mayor.html @@ -0,0 +1,11 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The directly elected Mayor provides leadership and direction to the borough. They have overall responsibility for council policy and delivery of services. + +[Find more about the mayor's role](https://hackney.gov.uk/mayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCE::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCE::mayor.html new file mode 100644 index 000000000..71b5ec082 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCE::mayor.html @@ -0,0 +1,12 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The City Mayor has responsibility for all council decisions during their four-year term +and for selecting up to nine councillors as a supporting cabinet. + +[Find more about the mayor](https://www.leicester.gov.uk/your-council/city-mayor-peter-soulsby/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCR::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCR::mayor.html new file mode 100644 index 000000000..c174603c8 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LCR::mayor.html @@ -0,0 +1,26 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +Metro Mayors are directly elected by the people in their area and chair their Combined Authority. The Metro Mayor +exercises the powers and functions devolved from government, set out in the local area’s devolution deal. + +The UK government has devolved a range of powers and responsibilities to the Liverpool City Region Combined +Authority and the Mayor of the Liverpool City Region. These include: + +* Apprenticeships +* Business growth, innovation and support +* Children’s services +* Culture and tourism +* Employment and skills +* Energy and environment +* Some taxes and finance +* Health and social care +* Housing and planning +* Justice +* Transport + +[Find more about the mayor's role](https://www.liverpoolcityregion-ca.gov.uk/your-metro-mayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::LEW::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LEW::mayor.html new file mode 100644 index 000000000..b5693caad --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::LEW::mayor.html @@ -0,0 +1,22 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor is directly elected and appoints a Cabinet to lead on decision-making across the Council. Their +responsibilities include: + +* overall budget, strategy and policy responsibility +* trade unions +* service transformation +* Bakerloo line extension +* inward investment +* London Councils, Local Government Association and key stakeholder relationships +* Lewisham Strategic Partnership (LSP) +* communications +* Young Mayor's programme + + +[Find more about the mayor's role](https://lewisham.gov.uk/mayorandcouncil/mayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::MAS::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::MAS::mayor.html new file mode 100644 index 000000000..d53ef4d9e --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::MAS::mayor.html @@ -0,0 +1,13 @@ + +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +It is the job of the Mayor to represent the council and its residents, make key decisions on policies, services and how the council spends its money. + +The Mayor is supported by a Cabinet of councillors who help him or her develop and implement these policies. + +[Find more about the Mayor](https://www.mansfield.gov.uk/council-councillors-democracy/meet-mayor-1) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::MDB::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::MDB::mayor.html new file mode 100644 index 000000000..bec855362 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::MDB::mayor.html @@ -0,0 +1,12 @@ + + +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor of Middlesbrough leads the Middlesbrough Council and represents the borough at local, regional, and national levels. The Mayor's responsibilities include setting strategic priorities, overseeing economic development, and managing budgets for public services. The Mayor also works to improve transportation, housing, education, and community safety. Additionally, the Mayor engages with residents, businesses, and other stakeholders to address local issues and promote the well-being of the community. The role involves both independent decision-making and collaboration with the council and other local authorities. + +[Find more about the council](https://www.middlesbrough.gov.uk/council-and-democracy/about-the-council/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::NEMC::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NEMC::mayor.html new file mode 100644 index 000000000..e3806ad99 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NEMC::mayor.html @@ -0,0 +1,21 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +Combined authorities allow a group of local authorities to pool appropriate responsibility and receive certain +devolved functions from central government in order to deliver transport and economic policy more effectively over a +wider area. The mayor is the leader of the North East Mayoral Combined Authority and has responsibility for: + +* housing and regeneration +* education, skills and training +* the adult education budget +* the functional power of competence +* housing and planning, including mayoral development areas and corporations, land and acquisition powers +* finance, through council precepts and business rate supplements +* transport, including bus grants and franchising powers + +[Find more about the mayor's role](https://www.northeast-ca.gov.uk/about/the-mayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::NTY::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NTY::mayor.html new file mode 100644 index 000000000..85189f7f9 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NTY::mayor.html @@ -0,0 +1,19 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + + +The role of the Elected Mayor is to : + +* be the Authority’s principal public spokesperson +* give overall political direction to the Authority +* appoint the Cabinet and Deputy Mayor +* decide on the scheme of delegation for Cabinet functions +* chair meetings of the Cabinet +* represent the Authority on such external executive bodies as the Elected Mayor decides + +[Find more about the mayor's role](https://my.northtyneside.gov.uk/category/613/about-elected-mayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::NWM::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NWM::mayor.html new file mode 100644 index 000000000..a75635cce --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::NWM::mayor.html @@ -0,0 +1,11 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The Mayor of Newham is a directly elected mayor responsible for the executive function of the council. + +[Find more about the mayor](https://www.newham.gov.uk/council/mayor-newham-1) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::SCR::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::SCR::mayor.html new file mode 100644 index 000000000..a573edfd1 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::SCR::mayor.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor is elected to represent 1.4 million residents in the region. The Mayor acts to promote South Yorkshire as +a place to live, work, visit and invest. + +The MCA has powers and funding which are used to help create jobs, grow the economy, up-skill the workforce, support +the public transport network and develop new infrastructure and homes in South Yorkshire. Many decisions are made by +the MCA and Mayor together, but the Mayor can make some decisions independently. + +[Find more about the mayor's role](https://www.southyorkshire-ca.gov.uk/about-the-mayor/role) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::SLF::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::SLF::mayor.html new file mode 100644 index 000000000..6670d14d1 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::SLF::mayor.html @@ -0,0 +1,15 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The City Mayor leads the council and has overall responsibility for the delivery of all council services. + +They develop budgets to meet the needs of the city's residents, through the city plan, make +sure the work of the council is conducted in accordance with the constitution and the law and that all decisions are +open, transparent and understandable. + +[Find more about the mayor's role](https://www.salford.gov.uk/cmrole) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::TVCA::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::TVCA::mayor.html new file mode 100644 index 000000000..d7f7f40e9 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::TVCA::mayor.html @@ -0,0 +1,20 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor's primary role is to steer the work of the Tees Valley Combined Authority, which drives economic growth +and job creation in the area. The Combined Authority is distinct from local councils, which continue to deliver +local services independently. As part of a Devolution Deal, Tees Valley elected a Mayor to act as a single point of +accountability to both local people and central Government. Devolution provides more control over local budgets, +enabling the region to design services and boost the economy by reinvesting money back into the community. + +The Mayor sets budgets and priorities for economic development, acts as an ambassador to attract investment, and +oversees a £588 million Tees Valley Investment Plan. The Mayor also chairs the South Tees Development Corporation +(STDC) Board, which promotes economic growth and commercial development in the Tees Valley. This includes converting +assets in the South Tees area, now known as Teesworks, into opportunities for business investment and economic +growth. + +[Find more about the mayor and combined authority](https://teesvalley-ca.gov.uk/about/leadership/mayor/what-the-mayor-does/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::TWH::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::TWH::mayor.html new file mode 100644 index 000000000..b564f9108 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::TWH::mayor.html @@ -0,0 +1,28 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor has oversight for the following services and activities that fall within the Mayor and Cabinet Member +Portfolios – Decision Making powers are as set out in the Executive Scheme of Delegation in the Constitution + + +* Strategy and performance +* Co-ordination of policy development and implementation +* Council transformation and continuous improvement +* Emergency planning & business continuity +* Strategic partnerships +* Tower Hamlets strategic partnership and the Community Plan +* Oversight of community building and asset policy +* Oversight of relationships with external partners +* Communications +* Oversight of Budget strategy +* Town Hall strategy +* Regeneration strategy +* Regeneration Board +* Inequality + + +[Find more about the mayor's role](https://democracy.towerhamlets.gov.uk/mgExecPostDetails.aspx?ID=604) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::WAT::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::WAT::mayor.html new file mode 100644 index 000000000..d9a38ab4f --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::WAT::mayor.html @@ -0,0 +1,19 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The Mayor of Watford is a directly elected and the council's principal +public spokesperson, representing the council and the borough on local, +national and international platforms. The Mayor is responsible for: + + +* the overall political direction of the council +* the scheme of delegation for Executive functions +* Chairing the Cabinet + + +[Find more about the mayor](https://www.watford.gov.uk/electedmayor) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::WECA::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::WECA::mayor.html new file mode 100644 index 000000000..d1f33a5ff --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::WECA::mayor.html @@ -0,0 +1,10 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The Mayor of the West of England is the directly elected mayor who leads the West of England Combined Authority. The body, a combined authority, is responsible for the strategic administration of the West of England, including planning, transport and skills. + +[Find more about the mayor and combined authority](https://www.westofengland-ca.gov.uk/what-we-do/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::YNYC::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::YNYC::mayor.html new file mode 100644 index 000000000..ef07c4203 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::YNYC::mayor.html @@ -0,0 +1,23 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The role of the mayor is to work alongside local leaders to +create a long-term vision, secure more investment into +the region. + +The Mayor has certain powers and responsibilities, devolved to them by central government. + +These include: + +* Responsibility for 30-year Mayoral Investment Fund and the powers to borrow against funds +* Full devolution of the Adult Education Budget +* Powers to improve the supply and quality of housing and secure the development of land or infrastructure +* Powers and funds to improve transport through a consolidated, devolved, multi-year transport settlement +* Responsibilities for community safety and the powers to appoint a Deputy Mayor who will carry out many of the duties currently held by the Police, Fire and Crime Commissioner + + +[Find more about the mayor's role](https://yorknorthyorks-ca.gov.uk/meet-your-mayor/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::london::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::london::mayor.html new file mode 100644 index 000000000..3546bc6fd --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::london::mayor.html @@ -0,0 +1,22 @@ +{% load markdown_filter %} + + {# fmt:off #} +{% filter markdown %} +The Mayor sets an overall vision for London. He has a duty to create plans and policies for the capital covering: + +* Arts & Culture +* Business & Economy +* Environment +* Fire +* Health +* Housing and Land +* Planning +* Policing & Crime +* Regeneration +* Sport +* Transport +* Young People + +[Read more about what the Mayor of London does](https://www.london.gov.uk/who-we-are/what-mayor-does) + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::north-of-tyne::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::north-of-tyne::mayor.html new file mode 100644 index 000000000..7dfbd19b2 --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::north-of-tyne::mayor.html @@ -0,0 +1,8 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} +The North of Tyne Combined Authority was a mayoral combined authority which consisted of the local authorities of +Newcastle upon Tyne, North Tyneside, and Northumberland, all in North East England. + +{% endfilter %} diff --git a/wcivf/apps/administrations/templates/responsibilities/single_id/O::west-yorkshire::mayor.html b/wcivf/apps/administrations/templates/responsibilities/single_id/O::west-yorkshire::mayor.html new file mode 100644 index 000000000..77e5286fa --- /dev/null +++ b/wcivf/apps/administrations/templates/responsibilities/single_id/O::west-yorkshire::mayor.html @@ -0,0 +1,18 @@ +{% load markdown_filter %} + +{# fmt:off #} +{% filter markdown %} + +The West Yorkshire Combined Authority brings together the local authorities of Bradford, Calderdale, Kirklees, Leeds +and Wakefield. It develops and delivers policies, programmes and services which directly +benefit the people of West Yorkshire. + +The Mayor of West Yorkshire is a directly elected mayor responsible for the metropolitan county of West Yorkshire in +England. The Mayor chairs and leads the West Yorkshire Combined Authority, and assumes the office and powers of the +West Yorkshire Police and Crime Commissioner. + + +[Find more about the mayor's role](https://www.westyorks-ca.gov.uk/about-us/) + + +{% endfilter %} diff --git a/wcivf/apps/administrations/tests.py b/wcivf/apps/administrations/tests.py deleted file mode 100644 index a39b155ac..000000000 --- a/wcivf/apps/administrations/tests.py +++ /dev/null @@ -1 +0,0 @@ -# Create your tests here. diff --git a/wcivf/apps/administrations/tests/test_admistration_object.py b/wcivf/apps/administrations/tests/test_admistration_object.py new file mode 100644 index 000000000..9dfebab2c --- /dev/null +++ b/wcivf/apps/administrations/tests/test_admistration_object.py @@ -0,0 +1,14 @@ +from administrations.helpers import BASE_DATA_PATH, Administration + + +def test_all_files_parse(): + for filename in BASE_DATA_PATH.glob("*.json"): + admin_class = Administration(filename.stem) + has_template = False + try: + admin_class.responsibilities_template() + has_template = True + except: + raise + if not has_template: + print(admin_class.admin_id, admin_class.role_name()) diff --git a/wcivf/apps/elections/templates/elections/postcode_view.html b/wcivf/apps/elections/templates/elections/postcode_view.html index abb69301d..d340cc055 100644 --- a/wcivf/apps/elections/templates/elections/postcode_view.html +++ b/wcivf/apps/elections/templates/elections/postcode_view.html @@ -5,26 +5,31 @@ {% load postcode_tags %} {% block page_title %}{% include "elections/includes/_postcode_meta_title.html" %}{% endblock page_title %} -{% block page_description %}{% include "elections/includes/_postcode_meta_description.html" %}{% endblock page_description %} -{% block og_title_content %}{% include "elections/includes/_postcode_meta_title.html" %}{% endblock og_title_content %} -{% block og_description_content %}{% include "elections/includes/_postcode_meta_description.html" %}{% endblock og_description_content %} +{% block page_description %} + {% include "elections/includes/_postcode_meta_description.html" %}{% endblock page_description %} +{% block og_title_content %}{% include "elections/includes/_postcode_meta_title.html" %}{% endblock og_title_content %} +{% block og_description_content %} + {% include "elections/includes/_postcode_meta_description.html" %}{% endblock og_description_content %} {% block og_url_content %}{{ CANONICAL_URL }}{% endblock og_url_content %} -{% block twitter_title_content %}{% include "elections/includes/_postcode_meta_title.html" %}{% endblock twitter_title_content %} -{% block twitter_description_content %}{% include "elections/includes/_postcode_meta_title.html" %}{% endblock twitter_description_content %} +{% block twitter_title_content %} + {% include "elections/includes/_postcode_meta_title.html" %}{% endblock twitter_title_content %} +{% block twitter_description_content %} + {% include "elections/includes/_postcode_meta_title.html" %}{% endblock twitter_description_content %} {% block content %} -
+ +
{% if postelections.count != 1 %} {# Inline nav of elections #} {% include "elections/includes/inline_elections_nav_list.html" %} {% endif %} {% if not address_picker %} - {% for administration in administrations.administrations %} -

{{ administration.friendly_name }}

-

{{ administration.friendly_description }}

- {% endfor %} - + {% include "administrations/administrations_for_postcode.html" %} {% regroup postelections by election.election_date as elections_by_date %} {% for election_group in elections_by_date %} @@ -75,9 +80,91 @@

{{ administration.friendly_name }}

{% block in_page_javascript %}