2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

chnage to cave data model field: fully_explored, taken from kataster code

This commit is contained in:
Philip Sargent 2024-07-02 13:15:34 +03:00
parent e4d3e33dec
commit c58f2716b0
3 changed files with 39 additions and 9 deletions

View File

@ -87,6 +87,7 @@ class Cave(TroggleModel):
explorers = models.TextField(blank=True, null=True)
extent = models.CharField(max_length=100, blank=True, null=True)
filename = models.CharField(max_length=200) # if a cave is 'pending' this is not set. Otherwise it is.
fully_explored = models.BooleanField(default=False)
kataster_code = models.CharField(max_length=20, blank=True, null=True)
kataster_number = models.CharField(max_length=10, blank=True, null=True)
kataster_status = models.TextField(blank=True, null=True)

View File

@ -816,7 +816,7 @@ def read_cave(filename, mvf=None, cave=None):
length = getXMLmin0("length")
depth = getXMLmin0("depth")
extent = getXMLmin0("extent")
manual_edit = True
if not cave:
# we are parsing using databaseReset.py not an online edit
@ -853,6 +853,9 @@ def read_cave(filename, mvf=None, cave=None):
cave.non_public=boolify(non_public)
cave.official_name=official_name[0]
cave.kataster_code=kataster_code[0]
if "+" in kataster_code[0]:
cave.fully_explored = True
print(f"{kataster_code[0]} {slug}")
cave.kataster_number=kataster_number[0]
cave.unofficial_number=unofficial_number[0]
cave.explorers=explorers[0]

View File

@ -23,7 +23,8 @@
{% endfor %}
</ul>
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 />
Red star <span style="color: red">*</span> against a name indicates that no survex file is explicitly associated with the cave<br />
Blue star <span style="color: blue">*</span> against a name indicates that no survex file is explicitly associated with the cave but it is marked as 'fully explored'<br />
Blue triangle <span style="color: #43C6DB">&#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">&#x25B2;</span> against a name indicates that the cave has an Entrance, but no entrances have valid located survey stations.
@ -48,7 +49,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span title="the cave is 'pending' creation properly" style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span title="no survex file is explicitly associated with the cave (but there might be a *fix somewhere)" style="color: red">*</span>{% endif %}
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %}
</td></tr>
{% endfor %}
@ -72,8 +80,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
</td></tr>
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %} </td></tr>
{% endfor %}
</table>
@ -97,8 +111,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
</td></tr>
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %} </td></tr>
{% endfor %}
</table>
</div>
@ -120,8 +140,14 @@ Black triangle <span style="color: black">&#x25B2;</span> against a name indicat
{% endif %}
{% else %}<span style="color: #43C6DB">&#x25BC;</span>
{% endif %}
{% if cave.survex_file %}{% else %}<span style="color: red">*</span>{% endif %}
</td></tr>
{% if cave.survex_file %}{% else %}
{% if cave.fully_explored %}
<span title="no survex file is explicitly associated with the cave but it is fully explored" style="color: blue">*</span>
{% else %}
<span title="no survex file is explicitly associated with the cave" style="color: red">*</span>
{% endif %}
{% endif %} </td></tr>
{% endfor %}
</table>