diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-01-29 17:03:50 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-01-29 17:03:50 +0000 |
commit | 79bccade024c3c33921621e7968e9e9b9e2aafbb (patch) | |
tree | 076880c6596e4c5da10acce83d3506e2a5b01b43 /parsers/imports.py | |
parent | 5639435058191221687cc7bb2d0b64f0531d9164 (diff) | |
download | troggle-79bccade024c3c33921621e7968e9e9b9e2aafbb.tar.gz troggle-79bccade024c3c33921621e7968e9e9b9e2aafbb.tar.bz2 troggle-79bccade024c3c33921621e7968e9e9b9e2aafbb.zip |
separated out ent locations from survex parser
Diffstat (limited to 'parsers/imports.py')
-rw-r--r-- | parsers/imports.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/parsers/imports.py b/parsers/imports.py index c1de034..50b45cf 100644 --- a/parsers/imports.py +++ b/parsers/imports.py @@ -4,6 +4,7 @@ from django.db import transaction import troggle.parsers.caves import troggle.parsers.drawings +import troggle.parsers.locations import troggle.parsers.logbooks import troggle.parsers.people import troggle.parsers.QMs @@ -14,44 +15,37 @@ import troggle.settings Used only by databaseReset.py and online controlpanel. """ - def import_caves(): print("-- Importing Caves to ", end="") print(django.db.connections.databases["default"]["NAME"]) troggle.parsers.caves.readcaves() - def import_people(): print("-- Importing People (folk.csv) to ", end="") print(django.db.connections.databases["default"]["NAME"]) with transaction.atomic(): troggle.parsers.people.load_people_expos() - def import_surveyscans(): print("-- Importing Survey Scans") with transaction.atomic(): troggle.parsers.scans.load_all_scans() - def import_logbooks(): print("-- Importing Logbooks") with transaction.atomic(): troggle.parsers.logbooks.LoadLogbooks() - def import_logbook(year=2022): print(f"-- Importing Logbook {year}") with transaction.atomic(): troggle.parsers.logbooks.LoadLogbook(year) - def import_QMs(): print("-- Importing old QMs for 161, 204, 234 from CSV files") with transaction.atomic(): troggle.parsers.QMs.Load_QMs() - def import_survex(): # when this import is moved to the top with the rest it all crashes horribly print("-- Importing Survex and Entrance Positions") @@ -62,26 +56,17 @@ def import_survex(): troggle.parsers.survex.LoadSurvexBlocks() print(" - Survex entrances x/y/z Positions") with transaction.atomic(): - troggle.parsers.survex.LoadPositions() - + troggle.parsers.locations.LoadPositions() def import_ents(): - # when this import is moved to the top with the rest it all crashes horribly print(" - Survex entrances x/y/z Positions") with transaction.atomic(): - import troggle.parsers.survex - - troggle.parsers.survex.LoadPositions() - + troggle.parsers.locations.LoadPositions() def import_loadpos(): - # when this import is moved to the top with the rest it all crashes horribly - import troggle.parsers.survex - print(" - Survex entrances x/y/z Positions") with transaction.atomic(): - troggle.parsers.survex.LoadPositions() - + troggle.parsers.locations.LoadPositions() def import_drawingsfiles(): print("-- Importing Drawings files") |