This commit is contained in:
Mohamed Nouffer
2022-03-23 09:21:17 +05:30
parent ef32611b85
commit acbe659e2e
3 changed files with 9 additions and 20 deletions

View File

@ -394,26 +394,6 @@ def publish_date(sender, instance, created, **kwargs):
updateLineTable(mdl, fields)
if instance.layerof == 3:
updatePolygonTable(mdl, fields)
# with open(csv_f, 'r') as txt_file:
# reader = csv.reader(codecs.EncodedFile(txt_file, 'utf-8', 'utf-8-sig'), delimiter=",")
# for ln in reader:
# pass
# print(str(ln))
# fields = ln.split(",")
# if instance.layerof == 2:
# updateLineTable(mdl, fields)
# if instance.layerof == 3:
# updatePolygonTable(mdl, fields)
#with open(csv, encoding='"utf-8-sig"') as txt_file:
#with open(csv, 'r') as txt_file:
# lns = txt_file.readlines()
# print(lns)
# for ln in lns:
# fields = ln.split(",")
# if instance.layerof == 2:
# updateLineTable(mdl, fields)
# if instance.layerof == 3:
# updatePolygonTable(mdl, fields)
except Exception as e:
print('##################',e)