diff --git a/core/models.py b/core/models.py index 1c86dd5..f0ce909 100644 --- a/core/models.py +++ b/core/models.py @@ -568,6 +568,12 @@ class Entrance(TroggleModel): def __unicode__(self): return unicode(self.slug()) + def exact_location(self): + return SurvexStation.objects.lookup(self.exact_station) + def other_location(self): + return SurvexStation.objects.lookup(self.other_station) + + def find_location(self): if self.tag_station: s = SurvexStation.objects.lookup(self.tag_station) diff --git a/templates/cave_entrances.html b/templates/cave_entrances.html index 6468ebc..b61d1ab 100644 --- a/templates/cave_entrances.html +++ b/templates/cave_entrances.html @@ -52,13 +52,13 @@
Bearings
{{ ent.entrance.bearings|safe }}
{% endif %} {% if ent.entrance.exact_station %} -
Exact Station
{{ ent.entrance.exact_station|safe }}
+
Exact Station
{{ ent.entrance.exact_station|safe }} {{ ent.exact_location.tag.y|safe }}, {{ ent.entrance.exact_location.x|safe }}, {{ ent.entrance.exact_location.z|safe }}m
{% endif %} {% if ent.entrance.other_station %}
Other Station
{{ ent.entrance.other_station|safe }} {% if ent.entrance.other_description %} - {{ ent.entrance.other_description|safe }} - {% endif %} + {% endif %} {{ ent.entrance.other_location.y|safe }}, {{ ent.entrance.other_location.x|safe }}, {{ ent.entrance.other_location.z|safe }}m
{% endif %}