mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
msg that control panel not working
This commit is contained in:
parent
02e475642a
commit
928c451040
@ -148,15 +148,17 @@ def controlpanel(request):
|
|||||||
|
|
||||||
|
|
||||||
def exportlogbook(request,year=None,extension=None):
|
def exportlogbook(request,year=None,extension=None):
|
||||||
'''Constructs, from the database, a complete HTML (or TXT) formatted logbook - but TEXT ONLY
|
'''Constructs, from the database, a complete HTML formatted logbook - but TEXT ONLY
|
||||||
for the current year. Formats available are HTML2005 or 2008text
|
for the current year. Formats available are HTML2005 or HTML2022 (planned)
|
||||||
|
|
||||||
There are no images stored in the database, so this is only a tool for a first pass, to be followed by
|
There are no images stored in the database, so this is only a tool for a first pass, to be followed by
|
||||||
extensive hand-editing.
|
extensive hand-editing.
|
||||||
|
|
||||||
NEED TO ADD IN THE MATERIAL WHIHC IS NOT IN ANY LBE ! e.g. front matter.
|
NEED TO ADD IN THE MATERIAL WHICH IS NOT IN ANY LBE ! e.g. front matter.
|
||||||
|
|
||||||
This is the recipient of the POST action os the export form in the control panel
|
This function DOES NOT WORK.
|
||||||
|
|
||||||
|
This function is the recipient of the POST action os the export form in the control panel
|
||||||
'''
|
'''
|
||||||
def lbeKey(lbe):
|
def lbeKey(lbe):
|
||||||
"""This function goes into a lexicogrpahic sort function
|
"""This function goes into a lexicogrpahic sort function
|
||||||
@ -178,13 +180,13 @@ def exportlogbook(request,year=None,extension=None):
|
|||||||
|
|
||||||
#print(f'Logbook has {len(logbook_entries)} entries in it.')
|
#print(f'Logbook has {len(logbook_entries)} entries in it.')
|
||||||
|
|
||||||
if extension =='txt':
|
if extension == 'html2005':
|
||||||
response = HttpResponse(content_type='text/plain')
|
|
||||||
style='2008'
|
|
||||||
else :
|
|
||||||
extension == 'html'
|
|
||||||
response = HttpResponse(content_type='text/html')
|
response = HttpResponse(content_type='text/html')
|
||||||
style='2005'
|
style='2005'
|
||||||
|
else :
|
||||||
|
extension == 'html2022'
|
||||||
|
response = HttpResponse(content_type='text/html')
|
||||||
|
style='2022'
|
||||||
|
|
||||||
filename='newlogbook.' + extension
|
filename='newlogbook.' + extension
|
||||||
template='logbook'+style+'style.'+extension
|
template='logbook'+style+'style.'+extension
|
||||||
|
@ -20,8 +20,24 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div style="column-count: 2;">
|
<h3>This control panel is being redeveloped</h3>
|
||||||
{%comment%}
|
|
||||||
|
<p>Do not attempt to use any of these functions as they are in active development.
|
||||||
|
<ol>
|
||||||
|
<li>Importing things in the wrong order will screw-up the database links and break things.
|
||||||
|
<li>The export of logbooks in a standard HTML-like format is very much not working.
|
||||||
|
</ol>
|
||||||
|
<p>Today (Jan. 2022) we use the <a href="/handbook/troggle/trogimport.html">databaseReset program</a> to import from the master files. This is run on the server itself only by nerds who remotely log in to the server using ssh.
|
||||||
|
|
||||||
|
<p>Before you even think about doing database imports, you should understand the implications on everyone else. See <a href="/handbook/troggle/trogindex.html">the Troggle documentation</a>.
|
||||||
|
<p>As soon as you can cope, you should read the source code for
|
||||||
|
<a href="http://expo.survex.com/repositories/troggle/.git/tree/databaseReset.py">databaseReset</a> to see what it does, as the details are not documented anywhere else yet. But at least the code is quite well commented.
|
||||||
|
|
||||||
|
<p>There is currently no feedback here when an import failure occurs - even a catastrophic one. You can see the list of parsing errors on the most recent imports on the <a href="/dataissues">Data Issues</a> page.
|
||||||
|
<font style="color: silver">
|
||||||
|
|
||||||
|
<div style="column-count: 2; ">
|
||||||
|
{% comment %}
|
||||||
<form name="reset" method="post" action="">
|
<form name="reset" method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<h3>Wipe:</h3>
|
<h3>Wipe:</h3>
|
||||||
@ -38,7 +54,7 @@
|
|||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
<h3>Import (on top of existing data):</h3>
|
<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.
|
<p>To get a fully-functioning system, all these imports must be done and in this order.
|
||||||
<form name="import" method="post" action="">
|
<form name="import" method="post" action="">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
@ -111,8 +127,8 @@
|
|||||||
<p>
|
<p>
|
||||||
Output style:
|
Output style:
|
||||||
<select name="extension">
|
<select name="extension">
|
||||||
<option value="html">.html file - 2005 style</option>
|
<option value="html2005">.html file - 2005 style</option>
|
||||||
<option value="txt">.txt file with MediaWiki markup</option>
|
<option value="html2022">.html file - 2022 style</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@ -125,4 +141,5 @@
|
|||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</font>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user