diff options
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}) |