diff --git a/core/views/other.py b/core/views/other.py index 9bb9c36..aadb613 100644 --- a/core/views/other.py +++ b/core/views/other.py @@ -148,15 +148,17 @@ def controlpanel(request): def exportlogbook(request,year=None,extension=None): - '''Constructs, from the database, a complete HTML (or TXT) formatted logbook - but TEXT ONLY - for the current year. Formats available are HTML2005 or 2008text + '''Constructs, from the database, a complete HTML formatted logbook - but TEXT ONLY + 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 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): """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.') - if extension =='txt': - response = HttpResponse(content_type='text/plain') - style='2008' - else : - extension == 'html' + if extension == 'html2005': response = HttpResponse(content_type='text/html') style='2005' + else : + extension == 'html2022' + response = HttpResponse(content_type='text/html') + style='2022' filename='newlogbook.' + extension template='logbook'+style+'style.'+extension diff --git a/templates/controlPanel.html b/templates/controlPanel.html index 8d90315..5d4cac0 100644 --- a/templates/controlPanel.html +++ b/templates/controlPanel.html @@ -20,8 +20,24 @@ {% endif %} -
-{%comment%} +

This control panel is being redeveloped

+ +

Do not attempt to use any of these functions as they are in active development. +

    +
  1. Importing things in the wrong order will screw-up the database links and break things. +
  2. The export of logbooks in a standard HTML-like format is very much not working. +
+

Today (Jan. 2022) we use the databaseReset program 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. + +

Before you even think about doing database imports, you should understand the implications on everyone else. See the Troggle documentation. +

As soon as you can cope, you should read the source code for +databaseReset to see what it does, as the details are not documented anywhere else yet. But at least the code is quite well commented. + +

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 Data Issues page. + + +

+{% comment %}
{% csrf_token %}

Wipe:

@@ -38,7 +54,7 @@ {% endcomment %}

Import (on top of existing data):

-

To get a fully-functioning system, all these imports must be done and in this order. +

To get a fully-functioning system, all these imports must be done and in this order. {% csrf_token %} @@ -111,8 +127,8 @@

Output style:

@@ -125,4 +141,5 @@

+ {% endblock %} \ No newline at end of file