diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-05-07 23:46:11 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-05-07 23:46:11 +0100 |
commit | 39cd616c903b2fc0651e3258b26ba03ac4394d9d (patch) | |
tree | eaca7af2df78f64009809de168385d6c68e7e0cf | |
parent | 8c5fdf5021481bb9ea99fa6309ebc67a5c57f5b5 (diff) | |
download | troggle-39cd616c903b2fc0651e3258b26ba03ac4394d9d.tar.gz troggle-39cd616c903b2fc0651e3258b26ba03ac4394d9d.tar.bz2 troggle-39cd616c903b2fc0651e3258b26ba03ac4394d9d.zip |
survexstations also tabulated
-rw-r--r-- | core/views/statistics.py | 6 | ||||
-rw-r--r-- | templates/eastings.html | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/core/views/statistics.py b/core/views/statistics.py index 99af707..8f2cc47 100644 --- a/core/views/statistics.py +++ b/core/views/statistics.py @@ -13,7 +13,7 @@ from django.utils import timezone from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue from troggle.core.models.caves import Cave, LogbookEntry, Entrance -from troggle.core.models.survex import SurvexBlock +from troggle.core.models.survex import SurvexBlock, SurvexStation import troggle.settings as settings @@ -167,4 +167,6 @@ def eastings(request): if e.easting or e.northing: ents.append(e) - return render(request,'eastings.html', {'ents': ents}) + stations = SurvexStation.objects.all() + + return render(request,'eastings.html', {'ents': ents, 'stations': stations}) diff --git a/templates/eastings.html b/templates/eastings.html index 40e72b6..422c9ea 100644 --- a/templates/eastings.html +++ b/templates/eastings.html @@ -25,5 +25,16 @@ These are all the locations specified in Northing/Easting coordinates in the sys {% endfor %} </table> +<p>But the Entrances - the objects in the troggle system - are not properly connected to the dataset which is the combined set of survex data. They are only linked - and only implicitly - by the tag name. +<table cellpadding="6" cellspacing="8"> +<tr><th>Survex Station</th><th>x</th><th>y</th></tr> +{% for s in stations %} +<tr> + <td style="text-align:left; width:240px"> {{s.name|safe}} </td> + <td style="text-align:right; width:90px"> {{s.x|floatformat:2}} </td> + <td style="text-align:right; width:90px"> {{s.y|floatformat:2}} </td> +</tr> +{% endfor %} +</table> {% endblock %}
\ No newline at end of file |