A lot of changes going on

This commit is contained in:
2025-05-13 16:40:48 +02:00
parent 3ff830b3e2
commit 5b16432767
37 changed files with 4332 additions and 183 deletions

View File

@@ -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))