summaryrefslogtreecommitdiffstats
path: root/core/views/other.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-12-30 00:55:42 +0000
committerPhilip Sargent <philip.sargent@klebos.com>2021-12-30 00:55:42 +0000
commit928c451040b17c5bd05c3ee185895678951f8653 (patch)
treecd8945ae232445ff568f0f2b0db68b0d4130baf8 /core/views/other.py
parent02e475642a813fad3cd7863180a16c272138ccc5 (diff)
downloadtroggle-928c451040b17c5bd05c3ee185895678951f8653.tar.gz
troggle-928c451040b17c5bd05c3ee185895678951f8653.tar.bz2
troggle-928c451040b17c5bd05c3ee185895678951f8653.zip
msg that control panel not working
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