msg that control panel not working

This commit is contained in:
Philip Sargent
2021-12-30 00:55:42 +00:00
parent 02e475642a
commit 928c451040
2 changed files with 33 additions and 14 deletions

View File

@@ -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