diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-09-16 22:46:17 +0300 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-09-16 22:46:17 +0300 |
commit | 017f916ef922bd11b1e745ccc4fa4bccd843f1d4 (patch) | |
tree | 36ca99a86ffc550f4b4203a6f16b6f870c510707 /core/views/statistics.py | |
parent | a85f859f886ac2a22a94a604f2ce46395c148476 (diff) | |
download | troggle-017f916ef922bd11b1e745ccc4fa4bccd843f1d4.tar.gz troggle-017f916ef922bd11b1e745ccc4fa4bccd843f1d4.tar.bz2 troggle-017f916ef922bd11b1e745ccc4fa4bccd843f1d4.zip |
Entrance locations showing lat long screwups
Diffstat (limited to 'core/views/statistics.py')
-rw-r--r-- | core/views/statistics.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py index f056ab1..d2544e0 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -284,6 +284,29 @@ def eastings(request): if e.lat_wgs84 or e.long_wgs84: ents.append(e) + for e in ents: + try: + ts = e.tag_station + if ts: + e.tag_ts = SurvexStation.objects.get(name=ts) + print(f"{e} {e.tag_ts} {e.tag_ts.lat()} {e.tag_ts.long()}") + + es = e.exact_station + if es: + e.tag_es = SurvexStation.objects.get(name=es) + print(f"{e} {e.tag_es} {e.tag_es.lat()} {e.tag_es.long()}") + + os = e.other_station + if os: + e.tag_os = SurvexStation.objects.get(name=os) + print(f"{e} {e.tag_os} {e.tag_os.lat()} {e.tag_os.long()}") + + except: + e.tag_ss = None + e.tag_es = None + e.tag_os = None + # print(f"exception for {e}") + stations = SurvexStation.objects.all() return render(request, "eastings.html", {"ents": ents, "stations": stations}) |