2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 13:03:46 +00:00

initial GPX track averager

This commit is contained in:
2025-08-29 19:18:47 +03:00
parent 4933515be6
commit cc3203a31f
3 changed files with 215 additions and 1 deletions

61
templates/gpxfixform.html Normal file
View File

@@ -0,0 +1,61 @@
{% extends "base.html" %}
{% block title %}Upload GPX file for a *fix{% endblock %}
{% block content %}
<h2>Upload GPX file for a *fix</h2>
<div style = "max-width:35%; margin-left:20%; text-align: center; " >
<form method ='post' enctype ="multipart/form-data">
{% csrf_token %}
<br>
<input class="fancybutton2" type = "file"
name = "uploadfiles" id="uploadfiles" />
<br><br><br>
<input class="fancybutton2" style="padding: 0.5em 25px; margin-left: 125px"
label = "Rename to" name = "renameto" id="renameto"
pattern="[A-Za-z][A-Za-z0-9_-\.]*"/>
<br />
<label
style="padding: 0.5em 25px; margin-left: 110px"
for="renameto">You can rename it<br></label>
<br><br><br>
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 155px" type = "submit" value = "Upload" >
Upload
</button>
</form>
</div>
<div style = "max-width:29%; margin-left:20%; text-align: left" >
{% if filesaved %}
<p>
<b>File(s) saved as <br>
{% for f in actual_saved %}
<em>{{f}}</em> <br>
{% endfor %}
</p>
{% endif %}
<strong style="font-size: 110%;">Files:</strong><br>
{% for f in files %}
<a href="{{urlfile|urlencode}}/{{f|urlencode}}">{{f}}</a><br />
{% empty %}
<p>&lt;No files here&gt;
{% endfor %}
</div>
<p>You can upload your GPX track which will be averaged into a single *fix
<p>Note that only GPX files are accepted: all other types of files are refused.
<hr>
</button>
</form>
</div>
<p>
<hr />
{% endblock %}