From 76854a84d70ff40e3979d652f045ee53b4cac504 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Fri, 10 Oct 2025 22:18:29 +0300 Subject: [PATCH] fix Explorers field --- core/forms.py | 18 +++++++++++------- templates/cave.html | 10 ++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/core/forms.py b/core/forms.py index f0a6d6a..d38acaf 100644 --- a/core/forms.py +++ b/core/forms.py @@ -63,8 +63,10 @@ class CaveForm(ModelForm): widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter page content (using HTML)"}), ) explorers = forms.CharField( - required=False, - widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter page content (using HTML)"}), + required=False, + label = "Explorers: CUCC expo or another club?", + widget=HTMLarea(attrs={"height": "80%", "rows": 20, + "placeholder": "Enter page content (using HTML)"}), ) equipment = forms.CharField( required=False, @@ -109,7 +111,7 @@ class CaveForm(ModelForm): exclude = ("filename", "url", "kataster_status") field_order = ['unofficial_number', 'kataster_number', 'official_name', 'unexplored', 'underground_description', 'survey', - 'explorers', 'equipment', 'notes', 'references', 'description_file', 'survex_file', + 'equipment', 'notes', 'references', 'description_file', 'survex_file', 'explorers', 'areacode', 'subarea', 'length', 'depth', 'extent', 'kataster_code', 'kataster_status', 'fully_explored', 'non_public', 'identified_login', 'who_are_you'] @@ -153,8 +155,9 @@ class EntranceForm(ModelForm): required=False, widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Enter text (using HTML)"}), ) - explorers = forms.CharField(required=False, widget=forms.TextInput(attrs={"size": "45"})) - # explorers = forms.CharField(required = False, widget=TinyMCE(attrs={'cols': 80, 'rows': 10})) + # explorers = forms.CharField(required=False, + # label = "Explorers: CUCC expo or another club?", + # widget=forms.TextInput(attrs={"size": "45"})) location_description = forms.CharField( label="Location", @@ -227,8 +230,8 @@ class EntranceForm(ModelForm): ) ) - field_order = ['name', 'entrance_description', 'explorers', 'map_description', 'location_description', 'lastvisit', 'non_public', - 'findability', 'marking', 'approach', 'underground_description', 'photo', 'marking_comment', 'findability_description', 'other_description', + field_order = ['name', 'entrance_description', 'map_description', 'location_description', 'lastvisit', 'non_public', + 'findability', 'marking', 'approach', 'underground_description', 'photo', 'marking_comment', 'findability_description', 'other_description', 'bearings', 'tag_station', 'other_station', 'easting', 'northing', 'lat_wgs84', 'long_wgs84', 'alt', 'identified_login', 'who_are_you'] class Meta: @@ -238,6 +241,7 @@ class EntranceForm(ModelForm): "map_description", # No entrance has any data on this field, so it is being retired. "filename", "slug", + "explorers", # archaic for Cave, redundant for Entrance "bearings" ) diff --git a/templates/cave.html b/templates/cave.html index a7a3cd7..1ae253e 100644 --- a/templates/cave.html +++ b/templates/cave.html @@ -106,10 +106,6 @@ Nope, it is not useful, removing it... Philip S. {{ cave.underground_centre_line|safe }} {% endif %} --> -{% if cave.explorers %} -

Explored by CUCC (expo)? Or ARGE ?

- {{ cave.explorers|safe }} -{% endif %} {% if cave.references %}

References

{{ cave.references|safe }} @@ -239,6 +235,12 @@ to equate p{{ ent.entrance.name|lower|safe }} to the actual survey st Download .3d file {{cave}}.3d
cave survex path '{{ cave.areacode }}/{% if cave.kataster_number %}{{cave.kataster_number}}{% else %}{{cave.unofficial_number}}{% endif %}/' + +{% if cave.explorers %} +

Explorers

+

{{ cave.explorers|safe }}
+

[This is a fossil: it used to show whether the cave was explored by CUCC/expo or by another group, but that information is now available in the survex files recording the surveying.] +{% endif %}

{% endif %} {% endblock content %}