forked from expo/troggle
Northings and Easting report
This commit is contained in:
parent
41ed15f47f
commit
1ff723554c
@ -12,7 +12,7 @@ from django.utils import timezone
|
||||
#from django.views.generic.list import ListView
|
||||
|
||||
from troggle.core.models.troggle import Expedition, Person, PersonExpedition, DataIssue
|
||||
from troggle.core.models.caves import Cave, LogbookEntry
|
||||
from troggle.core.models.caves import Cave, LogbookEntry, Entrance
|
||||
from troggle.core.models.survex import SurvexBlock
|
||||
|
||||
import troggle.settings as settings
|
||||
@ -157,3 +157,14 @@ def dataissues(request):
|
||||
dilist.sort(key = myFunc)
|
||||
|
||||
return render(request,'dataissues.html', {'didict': dilist})
|
||||
|
||||
def eastings(request):
|
||||
'''report each Northing/Easting pair wherever recorded
|
||||
'''
|
||||
ents = []
|
||||
entrances = Entrance.objects.all()
|
||||
for e in entrances:
|
||||
if e.easting or e.northing:
|
||||
ents.append(e)
|
||||
|
||||
return render(request,'eastings.html', {'ents': ents})
|
||||
|
@ -98,9 +98,9 @@ LOGBOOK_PARSER_SETTINGS = {
|
||||
"1992": ("1992/log.htm", "Parseloghtml01"),
|
||||
"1991": ("1991/log.htm", "Parseloghtml01"),
|
||||
"1990": ("1990/log.htm", "Parseloghtml01"),
|
||||
"1989": ("1989/log.htm", "Parseloghtml01"),
|
||||
"1988": ("1988/log.htm", "Parseloghtml01"),
|
||||
"1987": ("1987/log.htm", "Parseloghtml01"),
|
||||
"1989": ("1989/log.htm", "Parseloghtml01"), #crashes MySQL
|
||||
"1988": ("1988/log.htm", "Parseloghtml01"), #crashes MySQL
|
||||
"1987": ("1987/log.htm", "Parseloghtml01"), #crashes MySQL
|
||||
"1985": ("1985/log.htm", "Parseloghtml01"),
|
||||
"1984": ("1984/log.htm", "Parseloghtml01"),
|
||||
"1983": ("1983/log.htm", "Parseloghtml01"),
|
||||
|
26
templates/eastings.html
Normal file
26
templates/eastings.html
Normal file
@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Cave Entrance locations in UTM{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Entrance locations</h1>
|
||||
|
||||
<p>
|
||||
This is work in progress (May 2021).
|
||||
|
||||
<table>
|
||||
<tr><th>Entrance</th><th>Easting</th><th>Northing</th><th>tag</th><th>tag exact</th><th>tag other</th></tr>
|
||||
{% for ent in ents %}
|
||||
<tr>
|
||||
<td style="text-align:left"><a href="{{ ent.name }}">{{ent.name|safe}}</a></td>
|
||||
<td style="text-align:right">{{ent.easting|floatformat:2}}</td>
|
||||
<td style="text-align:right">{{ent.northing|floatformat:2}}</td>
|
||||
<td style="text-align:right">{{ent.tag_station}}</td>
|
||||
<td style="text-align:right">{{ent.exact_station}}</td>
|
||||
<td style="text-align:right">{{ent.other_station}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
1
urls.py
1
urls.py
@ -132,6 +132,7 @@ trogglepatterns = [
|
||||
path('stats', statistics.stats, name="stats"),
|
||||
path('pathsreport', statistics.pathsreport, name="pathsreport"),
|
||||
path('dataissues', statistics.dataissues, name="dataissues"),
|
||||
path('eastings', statistics.eastings, name="eastings"),
|
||||
|
||||
path('troggle', frontpage, name="frontpage"), # control panel. Shows recent actions.
|
||||
path('todo/<path:module>', todos, name="todos"),
|
||||
|
Loading…
Reference in New Issue
Block a user