2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-21 23:01:52 +00:00

removing unused fields

This commit is contained in:
Philip Sargent 2023-11-18 14:17:50 +00:00
parent 7a61bc47ea
commit 7c7c0812e8
7 changed files with 29 additions and 11 deletions

View File

@ -243,7 +243,7 @@ class Entrance(TroggleModel):
lat_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated
location_description = models.TextField(blank=True, null=True)
long_wgs84 = models.TextField(blank=True, null=True) # manually entered not calculated
map_description = models.TextField(blank=True, null=True)
# map_description = models.TextField(blank=True, null=True)
marking = models.CharField(max_length=2, choices=MARKING_CHOICES, default="?")
marking_comment = models.TextField(blank=True, null=True)
name = models.CharField(max_length=100, blank=True, null=True)

View File

@ -506,7 +506,7 @@ def read_entrance(filename, ent=None):
findability = getXMLmax1("findability")
findability_description = getXMLmax1("findability_description")
location_description = getXMLmax1("location_description")
map_description = getXMLmax1("map_description")
#map_description = getXMLmax1("map_description")
marking = getXMLmax1("marking")
marking_comment = getXMLmax1("marking_comment")
name = getXMLmax1("name")
@ -534,7 +534,7 @@ def read_entrance(filename, ent=None):
ent.findability_description=findability_description[0]
ent.lastvisit=lastvisit[0]
ent.location_description=location_description[0]
ent.map_description=map_description[0]
#ent.map_description=map_description[0]
ent.marking=marking[0]
ent.marking_comment=marking_comment[0]
ent.other_description=other_description[0]
@ -741,7 +741,7 @@ def read_cave(filename, cave=None):
references = getXMLmax1("references")
survey = getXMLmax1("survey")
kataster_status = getXMLmax1("kataster_status")
underground_centre_line = getXMLmax1("underground_centre_line")
#underground_centre_line = getXMLmax1("underground_centre_line")
notes = getXMLmax1("notes")
length = getXMLmax1("length")
depth = getXMLmax1("depth")
@ -798,7 +798,7 @@ def read_cave(filename, cave=None):
cave.references=references[0]
cave.survey=survey[0]
cave.kataster_status=kataster_status[0]
cave.underground_centre_line=underground_centre_line[0]
#cave.underground_centre_line=underground_centre_line[0]
cave.notes=notes[0]
cave.length=length[0]
cave.depth=depth[0]

View File

@ -617,7 +617,7 @@ class LoadingSurvex:
SO we have to recognise the '*fix' too
"""
# *fix|36|reference|36359.40|82216.08|2000.00\n
rx_fixline = re.compile(r"(?i)^\s*[*]fix\s+([\w\d_\.\-]+)\s+(?:reference)?\s*([\d\.]*)\s+([\d\.]*)\s+([\d\.]*)\s*;(.*)$")
rx_fixline = re.compile(r"(?i)^\s*[*]fix\s+([\w\d_\.\-]+)\s+(?:reference)?\s*([\d\.]*)\s+([\d\.]*)\s+([\d\.]*)\s*;?(.*)$")
line = line.replace("\n","")
#fixline = self.rx_fixline.match(line)
@ -646,7 +646,6 @@ class LoadingSurvex:
fixid = str(survexblock.id)+ ":"+ name
self.fixes[fixid] = (survexblock, name, alt, comment)
message = f"{name}, {fixdata=}, last:{fixline.groups()[-1]}"
print(self.insp + message)
except Exception as e:
print(f'BAD fix comment {e}', file=sys.stderr)
print(f'BAD fix comment {name}, {fixdata=}\n{line.replace(" ","|")}\n{survexblock.survexfile.path}:{survexblock}', file=sys.stderr)

View File

@ -8,6 +8,24 @@
<h2>Entrances</h2>
<p>These are Entrances read from the <var>expoweb/entrance_data/*.html</var> files.
These are NOT the *entrance data points in the survex files.
<table>
<tr><th>entrance</th>
<th>ent map</th>
</tr>
{% for ent in ents %}
{% if ent.map_description %}
<tr>
<td>
#{{ent.id}} <a href="{{ent.firstcave.url}}">{{ent}}</a>
</td>
<td>
{{ent.map_description}}
</td>
</tr>
{% endif %}
{% endfor %}
</table>
<table>
<tr><th>entrance</th>
<th>ent slug</th>

View File

@ -36,7 +36,7 @@ code used in the Austrian kataster e.g '1/S +' - https://expo/.survex.com/katast
+ erforscht (exploration considered complete)
-->
<kataster_number>{{ cave.kataster_number|default_if_none:""|safe }}</kataster_number> <!-- (Either this or unofficial_number is required). Official number in Austrian kataster if one has been allocated -->
<unofficial_number>{{ cave.unofficial_number|default_if_none:""|safe }}</unofficial_number><!-- (Either this or kataster_number is required). Initial temporary cave ID used until kataster number is allocated e.g. '2012-DD-01'-->
<unofficial_number>{{ cave.unofficial_number|default_if_none:""|safe }}</unofficial_number><!-- (This is any name. Either this or kataster_number is required). Initial temporary cave ID used until kataster number is allocated e.g. '2012-DD-01'-->
{% for ce in cave.entrances.all %}
<entrance>
<entranceslug>{{ ce.entrance.slug|default_if_none:""|safe }}</entranceslug><!-- Internal ID to refer to each entrance instance in the entrance files (typically the same as that filename (e.g. 1623-161c). Matches the 'slug' field in the entrance file -->
@ -50,7 +50,7 @@ code used in the Austrian kataster e.g '1/S +' - https://expo/.survex.com/katast
<references>{{ cave.references|default_if_none:""|safe }}</references><!-- References to documentation. Could be Journal articles or Logbook entries. Can be links if the docs are online. -->
<survey>{{ cave.survey|default_if_none:""|safe }}</survey><!-- Drawn-up surveys. Scans of paper surveys or images/PDFs of electronic surveys. Should include HTML to display current plan and elevation, with links to larger versions (See section on URLs and files). Could list links to multiple years of survey, or even a separate survey page if it's complicated enough. -->
<kataster_status>{{ cave.kataster_status|default_if_none:""|safe }}</kataster_status>
<underground_centre_line>{{ cave.underground_centre_line|default_if_none:""|safe }}</underground_centre_line><!-- 'In dataset' if it is in the survex dataset. Blank if not, or notes about status such as 'surveyed, but no entrance fix so not yet in dataset'. -->
Blank if not, or notes about status such as 'surveyed, but no entrance fix so not yet in dataset'. -->
<notes>{{ cave.notes|default_if_none:""|safe }}</notes><!-- Normally empty, but place for anything else that should be noted, such as info on cave maybe being a duplicate, or lost -->
<length>{{ cave.length|default_if_none:""|safe }}</length><!-- Cave length. Can be left blank and system should fill it in automatically from survey data (it doesn't yet) -->
<depth>{{ cave.depth|default_if_none:""|safe }}</depth><!--Cave depth. Can be left blank and system should fill it in automatically from survey data (it doesn't yet) -->

View File

@ -23,7 +23,6 @@ though, you do not need to do a data import as it happens automatically -->
<name>{{ entrance.name|default_if_none:""|safe }}</name>
<entrance_description>{{ entrance.entrance_description|default_if_none:""|safe }}</entrance_description>
<explorers>{{ entrance.explorers|default_if_none:""|safe }}</explorers>
<map_description>{{ entrance.map_description|default_if_none:""|safe }}</map_description>
<location_description>{{ entrance.location_description|default_if_none:""|safe }}</location_description>
<lastvisit>{{ entrance.lastvisit|default_if_none:""|safe }}</lastvisit>
<approach>{{ entrance.approach|default_if_none:""|safe }}</approach>
@ -52,7 +51,7 @@ though, you do not need to do a data import as it happens automatically -->
<tag_station>{{ entrance.tag_station|default_if_none:""|safe }}</tag_station>
<other_station>{{ entrance.other_station|default_if_none:""|safe }}</other_station>
<other_description>{{ entrance.other_description|default_if_none:""|safe }}</other_description>
<bearings>{{ entrance.bearings|default_if_none:""|safe }}</bearings>
<bearings>{{ entrance.bearings|default_if_none:""|safe }}</bearings> <!-- this is now read-only and not editable on the forms-->
</entrance>
</body>
</html>

View File

@ -41,8 +41,10 @@ at troggle/core/forms.py ass this uses a Django magic form creation thinggy. -->
<table><tr><th>Entrance Letter</th><td>{{ entletter }}</td></table>
{% endif %}
<table>{{ entform }}
{% if ent.bearings %}
<tr><th><label for="id_bearings">Bearings (obsolete):</label></th><td>
{{ent.bearings|safe}}</td></tr>
{% endif %}
</table>
<p><input type="submit" value="Submit" /></p>
</form>