survexstations also tabulated

This commit is contained in:
Philip Sargent 2021-05-07 23:46:11 +01:00
parent 8c5fdf5021
commit 39cd616c90
2 changed files with 15 additions and 2 deletions
core/views
templates

@ -13,7 +13,7 @@ from django.utils import timezone
from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue
from troggle.core.models.caves import Cave, LogbookEntry, Entrance 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 import troggle.settings as settings
@ -167,4 +167,6 @@ def eastings(request):
if e.easting or e.northing: if e.easting or e.northing:
ents.append(e) ents.append(e)
return render(request,'eastings.html', {'ents': ents}) stations = SurvexStation.objects.all()
return render(request,'eastings.html', {'ents': ents, 'stations': stations})

@ -25,5 +25,16 @@ These are all the locations specified in Northing/Easting coordinates in the sys
{% endfor %} {% endfor %}
</table> </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 %} {% endblock %}