summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/models/caves.py10
-rw-r--r--parsers/locations.py11
-rw-r--r--templates/caveindex.html19
3 files changed, 31 insertions, 9 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index cac62a8..9d3472f 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -156,8 +156,14 @@ class Cave(TroggleModel):
def no_location(self):
no_data = True
for e in CaveAndEntrance.objects.filter(cave=self):
- if e.entrance.best_station:
- no_data = False
+ if e.entrance.best_station() and e.entrance.best_station() != "":
+ #print(self, e, e.entrance.best_station())
+ if e.entrance.best_station_object().x:
+ no_data = False
+ # if no_data:
+ # print(self, "location", no_data)
+ # else:
+ # print(self, "NO LOCATION", no_data)
return no_data
def singleentrance(self):
diff --git a/parsers/locations.py b/parsers/locations.py
index bde4671..8a5da4f 100644
--- a/parsers/locations.py
+++ b/parsers/locations.py
@@ -29,7 +29,10 @@ todo = """
class MapLocations(object):
"""Class used only for identifying the entrance locations
- Formerly used to put locations on a prospecting map"""
+ Formerly used to put locations on a prospecting map
+
+ We don't need these map locations any more ?!
+ They would only be used in addition to entrances going onto a map display"""
p = [
("laser.0_7", "BNase", "Reference", "Bräuning Nase laser point"),
@@ -108,7 +111,11 @@ def validate_entrance_stations(ent=None):
if so.count() != 0:
message =f"{so.count()} found for Entrance {ent} '{ent_type}' station '{st}' {so}"
else:
- message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'."
+ message = f" ! - Entrance {ent} has invalid '{ent_type}' station '{st}'"
+ if st == ent.best_station():
+ message = message + " - AND THIS IS THE 'BEST' ONE"
+ else:
+ message = message + " - not the 'best'"
stash_data_issue(parser="positions", message=message, url=url)
print(message)
bads +=1
diff --git a/templates/caveindex.html b/templates/caveindex.html
index e863f3d..4c2fb52 100644
--- a/templates/caveindex.html
+++ b/templates/caveindex.html
@@ -26,7 +26,7 @@
Red star <span style="color: red">*</span> against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere)<br />
Blue triangle <span style="color: blue">&#x25BC;</span> against a name indicates that the cave is 'pending' creation properly.<br />
Orange triangle <span style="color: orange">&#x25B2;</span> against a name indicates that the cave has no Entrance (and is not 'pending').<br />
-<!-- Black triangle <span style="color: black">&#x25BC;</span> against a name indicates that the cave has an Entrance, but no entrances have located survey stations.-->
+Black triangle <span style="color: black">&#x25B2;</span> against a name indicates that the cave has an Entrance, but no entrances have located survey stations.
<h3>1623</h3>
<div style="column-count: 3;">
@@ -42,7 +42,10 @@ Orange triangle <span style="color: orange">&#x25B2;</span> against a name indic
{{cave.unofficial_number }} {{cave.official_name|safe}}</a>
{% endif %}
{% if cave.filename %}
- {% if cave.entrances %}{% else %}<span style="color: orange">&#x25B2;</span>{% endif %}
+ {% if cave.entrances %}
+ {% if cave.no_location %}<span style="color: black">&#x25B2;</span>{% endif %}
+ {% else %}<span style="color: orange">&#x25B2;</span>
+ {% endif %}
{% else %}<span style="color: blue">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
@@ -63,7 +66,10 @@ Orange triangle <span style="color: orange">&#x25B2;</span> against a name indic
{% for cave in caves1626 %}
<tr><td><a href="{{ cave.url }}">{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}}</a> {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}}</a> {% endif %}
{% if cave.filename %}
- {% if cave.entrances %}{% else %}<span style="color: orange">&#x25B2;</span>{% endif %}
+ {% if cave.entrances %}
+ {% if cave.no_location %}<span style="color: black">&#x25B2;</span>{% endif %}
+ {% else %}<span style="color: orange">&#x25B2;</span>
+ {% endif %}
{% else %}<span style="color: blue">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
@@ -84,9 +90,12 @@ Orange triangle <span style="color: orange">&#x25B2;</span> against a name indic
{% for cave in caves1627 %}
<tr><td><a href="{{ cave.url }}">{% if cave.kataster_number %}{{ cave.kataster_number }} {{cave.official_name|safe}}</a> {% if cave.unofficial_number %}({{cave.unofficial_number }}){% endif %}{% else %}{{cave.unofficial_number }} {{cave.official_name|safe}}</a> {% endif %}
{% if cave.filename %}
- {% if cave.entrances %}{% else %}<span style="color: orange">&#x25B2;</span>{% endif %}
- {% else %}<span style="color: blue">&#x25BC;</span>
+ {% if cave.no_location %}<span style="color: black">&#x25B2;</span>{% endif %}
+ {% if cave.entrances %}
+ {% else %}<span style="color: orange">&#x25B2;</span>
{% endif %}
+ {% else %}<span style="color: blue">&#x25BC;</span>
+ {% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
</td></tr>