from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter


class Command(BaseXpressDemocracyClubCsvImporter):
    council_id = "E07000084"
    addresses_name = (
        "local.2018-05-03/Version 1/Democracy_Club__03May2018 Basingstoke.CSV"
    )
    stations_name = (
        "local.2018-05-03/Version 1/Democracy_Club__03May2018 Basingstoke.CSV"
    )
    elections = ["local.2018-05-03"]
    csv_delimiter = ","

    def address_record_to_dict(self, record):

        if record.addressline6.strip() == "RG24 7AY":
            return None

        return super().address_record_to_dict(record)

@@ -191,39 +191,39 @@
       %22local.201
-8
+9
 -05-0
-3
+2
 /Version 1/Democ
@@ -238,32 +238,33 @@
 b__0
-3
+2
 May201
-8 Basingstoke.CSV
+9.CSV02May2019.tsv
 %22%0A  
@@ -307,23 +307,23 @@
 ocal.201
-8
+9
 -05-0
-3
+2
 /Version
@@ -346,32 +346,33 @@
 b__0
-3
+2
 May201
-8 Basingstoke.CSV
+9.CSV02May2019.tsv
 %22%0A  
@@ -406,15 +406,15 @@
 .201
-8
+9
 -05-0
-3
+2
 %22%5D%0A 
@@ -482,16 +482,227 @@
 record):
+%0A        uprn = record.property_urn.strip().lstrip(%220%22)%0A%0A        if uprn == %2210008483736%22:%0A            rec = super().address_record_to_dict(record)%0A            rec%5B%22postcode%22%5D = %22RG19 8LB%22%0A            return rec
 %0A%0A      

add import script for Basingstoke & Deane (closes #1478)