2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

Have entrance coordinates displayed to web pages. (Requires expo web entrance survey points to start with 1623 or 1626)

This commit is contained in:
Martin Green 2023-04-30 00:57:54 +01:00
parent fc8584775e
commit ed9f7b03bf
2 changed files with 7 additions and 7 deletions

View File

@ -306,10 +306,10 @@ class Entrance(TroggleModel):
return str(self.slug)
def exact_location(self):
return SurvexStation.objects.lookup(self.exact_station)
return SurvexStation.objects.get(name = self.exact_station)
def other_location(self):
return SurvexStation.objects.lookup(self.other_station)
return SurvexStation.objects.get(name = self.other_station)
def find_location(self):
r = {"": "To be entered ", "?": "To be confirmed:", "S": "", "L": "Lost:", "R": "Refindable:"}[self.findability]
@ -370,7 +370,7 @@ class Entrance(TroggleModel):
return f[1]
def tag(self):
return SurvexStation.objects.lookup(self.tag_station)
return SurvexStation.objects.get(name = self.tag_station)
def needs_surface_work(self):
return self.findability != "S" or not self.has_photo or self.marking != "T"

View File

@ -159,22 +159,22 @@
<dt>Explorers</dt><dd>{{ ent.entrance.explorers|safe }}</dd>
{% endif %}
{% if ent.entrance.northing %}
<dt>Location</dt><dd>{{ ent.entrance.northing|safe }}, {{ ent.entrance.easting|safe }}, {{ ent.entrance.alt|safe }}m</dd>
<dt>Location</dt><dd>?BMN? Northing: {{ ent.entrance.northing|safe }}, Easting: {{ ent.entrance.easting|safe }}, {{ ent.entrance.alt|safe }}m</dd>
{% endif %}
{% if ent.entrance.tag_station %}
<dt>Tag Location</dt><dd>{{ ent.entrance.tag_station }} {{ ent.entrance.tag.y|safe }}, {{ ent.entrance.tag.x|safe }}, {{ ent.entrance.tag.z|safe }}m</dd>
<dt>Tag Location</dt><dd>{{ ent.entrance.tag_station }} UTM33 {{ ent.entrance.tag.y|floatformat:0 }}, {{ ent.entrance.tag.x|floatformat:0 }}, {{ ent.entrance.tag.z|floatformat:0 }}m</dd>
{% endif %}
{% if ent.entrance.bearings %}
<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 }} {{ ent.entrance.exact_location.y|safe }}, {{ ent.entrance.exact_location.x|safe }}, {{ ent.entrance.exact_location.z|safe }}m</dd>
<dt>Exact Station</dt><dd>{{ ent.entrance.exact_station|safe }} UTM33 {{ ent.entrance.exact_location.y|floatformat:0 }}, {{ ent.entrance.exact_location.x|floatformat:0 }}, {{ ent.entrance.exact_location.z|floatformat:0 }}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 %} {{ ent.entrance.other_location.y|safe }}, {{ ent.entrance.other_location.x|safe }}, {{ ent.entrance.other_location.z|safe }}m
{% endif %} UTM33 {{ ent.entrance.other_location.y|floatformat:0 }}, {{ ent.entrance.other_location.x|floatformat:0 }}, {{ ent.entrance.other_location.z|floatformat:0 }}m
</dd>
{% endif %}
</dl>