summaryrefslogtreecommitdiffstats
path: root/core/models/caves.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models/caves.py')
-rw-r--r--core/models/caves.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index 91453fc..0c8fdad 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -420,6 +420,26 @@ class Entrance(TroggleModel):
return cavelist[0].url_parent()
else:
return ""
+
+ def latlong(self):
+ station = None
+ if self.other_station:
+ try:
+ station = SurvexStation.objects.get(name = self.other_station)
+ except:
+ pass
+ if self.tag_station:
+ try:
+ station = SurvexStation.objects.get(name = self.tag_station)
+ except:
+ pass
+ if self.exact_station:
+ try:
+ station = SurvexStation.objects.get(name = self.exact_station)
+ except:
+ pass
+ if station:
+ return station.latlong()
def GetCaveLookup():