diff --git a/parsers/caves.py b/parsers/caves.py index 5304599..a38434e 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -402,7 +402,7 @@ def read_entrance(filename, ent=None): DataIssue.objects.create(parser="entrances", message=message, url=f"/cave/{slug}/edit/") print(message) - lastvisit = getXML(entrancecontents, "last visit date", maxItems=1, minItems=0, context=context) + lastvisit = getXML(entrancecontents, "lastvisit", maxItems=1, minItems=0, context=context) alt = getXMLmax1("alt") approach = getXMLmax1("approach") diff --git a/templates/cave.html b/templates/cave.html index 1bdb683..a8c0c5e 100644 --- a/templates/cave.html +++ b/templates/cave.html @@ -151,6 +151,9 @@ {% if ent.entrance.location_description %}
Location
{{ ent.entrance.location_description|safe }}
{% endif %} + {% if ent.entrance.lastvisit %} +
Date last visited
{{ ent.entrance.lastvisit|safe }}
+ {% endif %} {% if ent.entrance.approach %}
Approach
{{ ent.entrance.approach|safe }}
{% endif %} diff --git a/templates/cave_entrances.html b/templates/cave_entrances.html deleted file mode 100644 index ed02e68..0000000 --- a/templates/cave_entrances.html +++ /dev/null @@ -1,74 +0,0 @@ -
-

{% if cave.entrances %} -

Entrances

- - -{% endif %}

-New Entrance -