A lot of changes going on
This commit is contained in:
@@ -14,11 +14,11 @@ class AddressDAO:
|
||||
|
||||
|
||||
|
||||
|
||||
def __importPlz(self):
|
||||
with open("pfad zur datei", "r") as plz:
|
||||
with open("/home/dstoppek/Coden/Projekte/pyqcrm/doc/postleitzahl.json", "r") as plz:
|
||||
postcodes = json.load(plz)
|
||||
irgendwas = ""
|
||||
country = "Deutschland"
|
||||
|
||||
try:
|
||||
for i in postcodes:
|
||||
test =i["plz_name"].split(",")
|
||||
@@ -28,8 +28,8 @@ class AddressDAO:
|
||||
town = town.strip()
|
||||
if town:
|
||||
print(f"PROCESSING {i['name']} {town}")
|
||||
self.__cur.callproc("addZipCodes", (i["name"], town, irgendwas,))
|
||||
#self.__cur.callproc("addZipCodes", ("56271", "Kleinmaischeid", irgendwas,))
|
||||
self.__cur.callproc("importLocation", (country, town, i["name"],))
|
||||
|
||||
except mariadb.OperationalError as e:
|
||||
print(f"Database Error: {e}")
|
||||
finally:
|
||||
@@ -37,7 +37,7 @@ class AddressDAO:
|
||||
print("FINISHED")#
|
||||
|
||||
def __importCountry(self):
|
||||
with open("pfad zur datei", "r") as country:
|
||||
with open("/home/dstoppek/Coden/Projekte/pyqcrm/doc/staaten.json", "r") as country:
|
||||
countries = json.load(country)
|
||||
old = ""
|
||||
try:
|
||||
@@ -78,3 +78,4 @@ class AddressDAO:
|
||||
print(str(e))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user