Skip to content

Instantly share code, notes, and snippets.

'RG14 1BD',
'RG14 1HR',
'RG14 1RG',
'RG14 1RS',
'RG14 1RW',
'RG14 1UH',
'RG14 2LY',
'RG14 2NY',
'RG14 2RP',
'RG14 2SF',
In [7]: council = Council.objects.get(pk='E06000037')
In [8]: districts_requiring_address_lookup(council)
17 postcodes don't need attention
Out[8]:
{'Aldermaston - AA1': ['RG7 4PA', 'RG7 4JX', 'RG7 4PJ'],
'Aldermaston - AA2': ['RG7 2PB', 'RG7 2PD', 'RG7 4PJ', 'RG7 4PA'],
'Aldermaston - BH': ['RG7 4RN', 'RG7 4RT', 'RG19 8EF', 'RG7 4NB'],
'Aldermaston - MA': ['RG7 5TY', 'RG19 4NN', 'RG7 5RY', 'RG19 4NT', 'RG7 5TT'],
Labour Conservative LibDem Green UKIP SNP Plad Other winners post post_id election dc_election_id
3 3 1 1 1 Mount Hermon ward DIW:E05010802 Woking local election local.woking.2016-05-05
{
"council": {
"council_id": "E07000032",
"council_type": "DIS",
"mapit_id": "2281",
"name": "Amber Valley Borough Council",
"email": "enquiry@ambervalley.gov.uk",
"phone": "01773 841634",
"website": "http://www.ambervalley.gov.uk/council-and-democracy/councillors,-democracy-and-elections/elections/electoral-registration.aspx",
"postcode": "DE5 3BT",
Warning: screen name AidanBurleyMP not found for Aidan Burley: /person/43/aidan-burley
Warning: screen name reelectJack2015 not found for Jack Lopresti: /person/104/jack-lopresti
Warning: screen name MichaelMooreBRS not found for Michael Moore: /person/138/michael-moore
Warning: screen name nengel4ned not found for Natascha Engel: /person/146/natascha-engel
Warning: screen name bobblackman not found for Bob Blackman: /person/227/bob-blackman
Warning: screen name GregBarkerMP not found for Greg Barker: /person/238/greg-barker
Warning: screen name SteveNECambs not found for Stephen Barclay: /person/239/stephen-barclay
Warning: screen name MrSpeakerUK not found for John Bercow: /person/357/john-bercow
Warning: screen name SCrabb2015 not found for Stephen Crabb: /person/425/stephen-crabb
Warning: screen name Keith_Vaz not found for Keith Vaz: /person/427/keith-vaz
GSS Name
E05003198 Millom Without
E05003960 Plumpton, Streat, East Chiltington and St John (Without)
E05009305 Farringdon Without
E05002354 Castle Without
E05002396 Wokingham Without
E05010327 Rawcliffe & Clifton Without
E05010321 Heworth Without
E04010481 Millom Without
E04002471 St Cuthbert Without
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
"council_id","council_type","mapit_id","name","email","phone","website","postcode","address"
"E09000023","LBO","2492","Lewisham Borough Council","electoral.services@lewisham.gov.uk","020 8314 6086","http://www.lewisham.gov.uk/mayorandcouncil/elections/voting/Pages/how-do-i-register.aspx","SE6 4RU","London Borough of Lewisham
Laurence House
1 Catford Road
Catford
London"
"E09000030","LBO","2506","Tower Hamlets Borough Council","electoralservices@towerhamlets.gov.uk","020 7364 0872","http://www.towerhamlets.gov.uk/lgnl/council_and_democracy/elections__voting/electoral_registration.aspx","E14 2BG","London Borough of Tower Hamlets
Town Hall
7th Floor, Mulberry Place
5 Clove Crescent
> cat ONSPD_FEB_2016_UK.csv | ack N92000002 | cut -d , -f 1 | ack "\"([A-Z][A-Z])" --output '$1' | uniq -c
60502 BT
diff --git a/candidates/views/constituencies.py b/candidates/views/constituencies.py
index 794d5bd..585fb60 100644
--- a/candidates/views/constituencies.py
+++ b/candidates/views/constituencies.py
@@ -339,7 +339,11 @@ class ConstituencyRecordWinnerView(ElectionMixin, GroupRequiredMixin, FormView):
extra__elected=True,
extra__election=self.election_data
).count()
- max_winners = self.election_data.people_elected_per_post
+
abbey 4
sutton 4
castle 4
riverside 4
st mary's 4
old town 4
oakley 3
central 3
woodstock 3
university 3