diff --git a/core/forms.py b/core/forms.py index 05b982a..bd90490 100644 --- a/core/forms.py +++ b/core/forms.py @@ -180,11 +180,11 @@ class EntranceForm(ModelForm): required=False, widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}), ) - bearings = forms.CharField( - label="Bearings (obsolete)", - required=False, - widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}), - ) + # bearings = forms.CharField( + # label="Bearings (obsolete)", + # required=False, + # widget=HTMLarea(attrs={"height": "80%", "rows": 20, "placeholder": "Usually blank"}), + # ) tag_station = forms.CharField( required=False, widget=forms.TextInput(attrs={"size": "50","placeholder": "e.g. 1623.t2035-zb-03a"}), @@ -214,7 +214,8 @@ class EntranceForm(ModelForm): exclude = ( "cached_primary_slug", "filename", - "slug" + "slug", + "bearings" ) def clean(self): diff --git a/core/views/caves.py b/core/views/caves.py index 0d8c3e9..0811567 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -663,6 +663,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None): { "entform": entform, "cave": cave, + "ent": entrance, "entletter": entletter, "entletterform": entletterform, # is unset if not being used "entlettereditable": entlettereditable, diff --git a/parsers/survex.py b/parsers/survex.py index 9c5950c..3a4d42c 100644 --- a/parsers/survex.py +++ b/parsers/survex.py @@ -2416,7 +2416,6 @@ def FindAndLoadSurvex(): print(f" - Number of Survex legs: {legsnumber:,}") for f in svx_load.fixes: - # why are we seeing no *fixes from fixedpts/gps18.svx etc. ? They are parsed ! survexblock, name, altitude, comment = svx_load.fixes[f] s = survexblock spath = s.parent.survexfile @@ -2431,9 +2430,9 @@ def FindAndLoadSurvex(): if comment: # print(f"FIX {survexblock} {altitude} {comment}") if re.match("(?i)[^s]*srtm[\s\S]*", comment.lower()): - print(f"SRTM {ff}.svx::{survexblock} - {spath}.svx - '{comment}'") + print(f"SRTM {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'") if re.match("(?i)[^s]*radost[\s\S]*", comment.lower()): - print(f"RDST {ff}.svx::{survexblock} - {spath}.svx - '{comment}'") + print(f"RDST {ff}.svx::{survexblock} - {spath}.svx - alt={altitude} '{comment}'") svx_load = None diff --git a/templates/editentrance.html b/templates/editentrance.html index 00fd196..a104ec3 100644 --- a/templates/editentrance.html +++ b/templates/editentrance.html @@ -40,7 +40,10 @@ at troggle/core/forms.py ass this uses a Django magic form creation thinggy. --> {% else %}
Entrance Letter{{ entletter }}
{% endif %} - {{ entform }}
+ {{ entform }} + +
+{{ent.bearings|safe}}