diff --git a/core/models/caves.py b/core/models/caves.py index 8af9a76..691959b 100644 --- a/core/models/caves.py +++ b/core/models/caves.py @@ -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) diff --git a/parsers/caves.py b/parsers/caves.py index f2176e0..da55ea7 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -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] diff --git a/templates/caveindex.html b/templates/caveindex.html index 560eb1b..f444905 100644 --- a/templates/caveindex.html +++ b/templates/caveindex.html @@ -23,7 +23,8 @@ {% endfor %} -Red star * against a name indicates that no survex file is explicitly associated with the cave (but there might be a *fix somewhere)
+Red star * against a name indicates that no survex file is explicitly associated with the cave
+Blue star * against a name indicates that no survex file is explicitly associated with the cave but it is marked as 'fully explored'
Blue triangle against a name indicates that the cave is 'pending' creation properly.
Orange triangle against a name indicates that the cave has no Entrance (and is not 'pending').
Black triangle against a name indicates that the cave has an Entrance, but no entrances have valid located survey stations. @@ -48,7 +49,14 @@ Black triangle against a name indicat {% endif %} {% else %} {% endif %} - {% if cave.survex_file %}{% else %}*{% endif %} + {% if cave.survex_file %}{% else %} + {% if cave.fully_explored %} + * + {% else %} + * + {% endif %} + + {% endif %} {% endfor %} @@ -72,8 +80,14 @@ Black triangle against a name indicat {% endif %} {% else %} {% endif %} - {% if cave.survex_file %}{% else %}*{% endif %} - + {% if cave.survex_file %}{% else %} + {% if cave.fully_explored %} + * + {% else %} + * + {% endif %} + + {% endif %} {% endfor %} @@ -97,8 +111,14 @@ Black triangle against a name indicat {% endif %} {% else %} {% endif %} - {% if cave.survex_file %}{% else %}*{% endif %} - + {% if cave.survex_file %}{% else %} + {% if cave.fully_explored %} + * + {% else %} + * + {% endif %} + + {% endif %} {% endfor %} @@ -120,8 +140,14 @@ Black triangle against a name indicat {% endif %} {% else %} {% endif %} - {% if cave.survex_file %}{% else %}*{% endif %} - + {% if cave.survex_file %}{% else %} + {% if cave.fully_explored %} + * + {% else %} + * + {% endif %} + + {% endif %} {% endfor %}