summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin <devnull@localhost>2012-08-14 15:08:08 +0200
committerMartin <devnull@localhost>2012-08-14 15:08:08 +0200
commit29c2c5f88de2da894230018903a0d7d16afc3858 (patch)
treea6edc4a67d602ed8dd38e49f3c0600a3d0f3bf42
parent532b8e064b3ca33cabcbef123c117765811dc3c3 (diff)
downloadtroggle-29c2c5f88de2da894230018903a0d7d16afc3858.tar.gz
troggle-29c2c5f88de2da894230018903a0d7d16afc3858.tar.bz2
troggle-29c2c5f88de2da894230018903a0d7d16afc3858.zip
added entrance locations
-rw-r--r--core/models.py6
-rw-r--r--templates/cave_entrances.html4
2 files changed, 8 insertions, 2 deletions
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 @@
<dt>Bearings</dt><dd>{{ ent.entrance.bearings|safe }}</dd>
{% endif %}
{% if ent.entrance.exact_station %}
- <dt>Exact Station</dt><dd>{{ ent.entrance.exact_station|safe }}</dd>
+ <dt>Exact Station</dt><dd>{{ ent.entrance.exact_station|safe }} {{ ent.exact_location.tag.y|safe }}, {{ ent.entrance.exact_location.x|safe }}, {{ ent.entrance.exact_location.z|safe }}m</dd>
{% endif %}
{% if ent.entrance.other_station %}
<dt>Other Station</dt><dd>{{ 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
</dd>
{% endif %}
</dl>