summaryrefslogtreecommitdiffstats
path: root/core/views/other.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/other.py')
-rw-r--r--core/views/other.py20
1 files changed, 11 insertions, 9 deletions
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