2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 12:41:09 +00:00

Imports in control panel work again

This commit is contained in:
Philip Sargent
2021-04-27 20:44:24 +01:00
parent 821aaa1f66
commit 5e478c7eb0
5 changed files with 106 additions and 54 deletions

View File

@@ -3,28 +3,27 @@
{% if jobs_completed %}
<div class="noticeBox">
Just finished running:
&nbsp;Just finished running:
<ul>
{% for job in jobs_completed %}
<li>{{ job }}</li>
{% endfor %}
</ul>
{% if settings.LOGFILE %}See the logfile at {{settings.LOGFILE}} for more information.{% endif %}
<a href="#" class="closeDiv">dismiss this message</a>
&nbsp;See <a href="/dataissues">Data Issues</a> report
<br>&nbsp;
</div>
{% endif %}
{% if error %}
<div class="noticeBox">
{{ error }}
<a href="#" class="closeDiv">dismiss this message</a>
</div>
{% endif %}
<h2>NONE of this is working currently</h2>
<h2>The code behind this page is under repair</h2>
<div style="column-count: 2;">
{%comment%}
<form name="reset" method="post" action="">
{% csrf_token %}
<h3>Wipe:</h3>
<table>
<tr>
@@ -36,55 +35,68 @@
</tr>
</table>
</form>
<h3>Import (non-destructive):</h3>
{% endcomment %}
<h3>Import (on top of existing data):</h3>
<p>To get a fully-functioning system, all these imports must be done and in this order.
<form name="import" method="post" action="">
{% csrf_token %}
<table>
<tr>
<td>people from folk.csv using parsers\people.py</td>
<th colspan="2">Import from master files</th>
</tr>
<tr>
<td>all caves </td>
<td><input type="checkbox" name="import_caves"/></td>
</tr>
<tr>
<td>all people </td>
<td><input type="checkbox" name="import_people"/></td>
</tr>
<tr>
<td>logbook entries using parsers\logbooks.py</td>
<td>all surveys scans </td>
<td><input type="checkbox" name="import_surveyscans"/></td>
</tr>
<tr>
<td>all logbooks</td>
<td><input type="checkbox" name="import_logbooks"/></td>
</tr>
<tr>
<td>QMs using parsers\QMs.py</td>
<td>QMs (from old csv files)</td>
<td><input type="checkbox" name="import_QMs" /></td>
</tr>
<tr>
<td>survey scans using parsers\surveys.py</td>
<td><input type="checkbox" name="import_surveys" /></td>
<td>all drawings files</td>
<td><input type="checkbox" name="import_drawingsfiles" /></td>
</tr>
<tr>
<td>survex data using parsers\survex.py</td>
<td>all survex data (10 minutes)</td>
<td><input type="checkbox" name="import_survex" /></td>
</tr>
</table>
<p>
<input type="submit" id="Import" value="Import">
<input type="submit" name="check_all_import" id="check_all_import" value="Check all" disabled >
</p>
</form>
<h3>Export to legacy formats:</h3>
<p>&nbsp;
<h3>Export to a different format:</h3>
<p>This creates 'newlogbook.html' in the years/&lt;year&gt;/ folder
<table>
<th>
<td>Export onto server</td>
<td>Export and Download</td>
</th>
<tr>
<td>
surveys to Surveys.csv
</td>
<td>
</td>
<th>Export and Download</th>
</tr>
<tr>
<td>
<form name="export" method="get" action={% url "downloadlogbook" %}>
{% csrf_token %}
<p>Download a logbook file which is dynamically generated by Troggle.</p>
<p>
@@ -99,8 +111,8 @@
<p>
Output style:
<select name="extension">
<option value="txt">.txt file with MediaWiki markup - 2008 style</option>
<option value="html">.html file - 2005 style</option>
<option value="txt">.txt file with MediaWiki markup</option>
</select>
</p>
<p>
@@ -112,5 +124,5 @@
</table>
</form>
</div>
{% endblock %}