Skip to content

Commit

Permalink
Merge pull request #2109 from DemocracyClub/remove-parl-boundaries
Browse files Browse the repository at this point in the history
remove parl_boundaries feature
  • Loading branch information
chris48s authored Dec 5, 2024
2 parents 5a97078 + a75051d commit 81e4e06
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 173 deletions.
6 changes: 2 additions & 4 deletions fixtures/vcr_cassettes/test_uprn_view.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ interactions:
Council","email":"[email protected]","phone":"0345 678 9015","website":"http://www.shropshire.gov.uk/","postcode":"SY2
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"registration":{"council_id":"SHR","name":"Shropshire
Council","email":"[email protected]","phone":"0345 678 9015","website":"http://www.shropshire.gov.uk/","postcode":"SY2
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"postcode_location":{"type":"Feature","properties":null,"geometry":{"type":"Point","coordinates":[-2.326615276923077,52.49552346923076]}},"parl_boundary_changes":{"current_constituencies_official_identifier":"gss:E14000799","current_constituencies_name":"Ludlow","new_constituencies_official_identifier":"gss:E14001493","new_constituencies_name":"South
Shropshire","CHANGE_TYPE":"NAME_CHANGE_BOUNDARY_CHANGE"}}'
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"postcode_location":{"type":"Feature","properties":null,"geometry":{"type":"Point","coordinates":[-2.326615276923077,52.49552346923076]}}}'
headers:
Connection:
- keep-alive
Expand Down Expand Up @@ -75,8 +74,7 @@ interactions:
Council","email":"[email protected]","phone":"0345 678 9015","website":"http://www.shropshire.gov.uk/","postcode":"SY2
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"registration":{"council_id":"SHR","name":"Shropshire
Council","email":"[email protected]","phone":"0345 678 9015","website":"http://www.shropshire.gov.uk/","postcode":"SY2
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"postcode_location":{"type":"Feature","properties":null,"geometry":{"type":"Point","coordinates":[-2.326615276923077,52.49552346923076]}},"parl_boundary_changes":{"current_constituencies_official_identifier":"gss:E14000799","current_constituencies_name":"Ludlow","new_constituencies_official_identifier":"gss:E14001493","new_constituencies_name":"South
Shropshire","CHANGE_TYPE":"NAME_CHANGE_BOUNDARY_CHANGE"}}'
6ND","address":"Electoral Registration Officer\nShirehall\nAbbey Foregate\nShrewsbury","identifiers":["E06000051"],"nation":"England"},"postcode_location":{"type":"Feature","properties":null,"geometry":{"type":"Point","coordinates":[-2.326615276923077,52.49552346923076]}}}'
headers:
Age:
- '25'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,6 @@ <h5>{% trans "Citizenship" %}</h5>
{% if postelection.ballotnewsarticle_set.exists %}
{% include "news_mentions/news_articles.html" with news_articles=postelection.ballotnewsarticle_set.all %}
{% endif %}
{% if parl_boundary_changes and postelection.election.slug == "parl.2024-07-04" %}
{% include "elections/includes/parl_boundary_changes.html" %}
{% endif %}
{% if postelection.wikipedia_bio %}
<div class="ds-card">
<div class="ds-card-body">
Expand Down

This file was deleted.

11 changes: 1 addition & 10 deletions wcivf/apps/elections/views/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ def postcode_to_ballots(self, postcode, uprn=None, compact=False):
kwargs = {"postcode": postcode}
if uprn:
kwargs["uprn"] = uprn
parl_boundary_changes = getattr(
settings, "SHOW_PARL_BOUNDARY_CHANGES", False
)
if parl_boundary_changes:
kwargs["parl_boundaries"] = 1

results_json = DEVS_DC_CLIENT.make_request(**kwargs)
all_ballots = []
ret = {
Expand All @@ -57,11 +53,6 @@ def postcode_to_ballots(self, postcode, uprn=None, compact=False):
),
}

if parl_boundary_changes:
ret["parl_boundary_changes"] = results_json.get(
"parl_boundary_changes", None
)

if ret["address_picker"]:
ret["addresses"] = results_json["addresses"]
return ret
Expand Down
3 changes: 0 additions & 3 deletions wcivf/apps/elections/views/postcode_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ def get_context_data(self, **kwargs):
context["polling_station"] = self.ballot_dict.get("polling_station")
context["council"] = self.ballot_dict.get("electoral_services")
context["registration"] = self.ballot_dict.get("registration")
context["parl_boundary_changes"] = self.ballot_dict.get(
"parl_boundary_changes", None
)
context["postcode_location"] = self.ballot_dict.get(
"postcode_location", None
)
Expand Down
1 change: 0 additions & 1 deletion wcivf/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def get_ec2_ip():
firehose_args = {"function_arn": LOGGER_ARN} if LOGGER_ARN else {"fake": True}
POSTCODE_LOGGER = DCWidePostcodeLoggingClient(**firehose_args)

SHOW_PARL_BOUNDARY_CHANGES = os.environ.get("SHOW_PARL_BOUNDARY_CHANGES", False)
SHOW_HUSTINGS_CTA = False
ENABLE_LAYERS_OF_STATE_FEATURE = os.environ.get(
"ENABLE_LAYERS_OF_STATE_FEATURE", False
Expand Down

0 comments on commit 81e4e06

Please sign in to comment.