summaryrefslogtreecommitdiffstats
path: root/core/models/logbooks.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/models/logbooks.py')
-rw-r--r--core/models/logbooks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/models/logbooks.py b/core/models/logbooks.py
index 37d6cb1..326a097 100644
--- a/core/models/logbooks.py
+++ b/core/models/logbooks.py
@@ -76,17 +76,17 @@ class LogbookEntry(TroggleModel):
return index
def writelogbook(year, filename):
+ """Writes all the database logbook entries into a new logbook.html file
+ """
current_expedition = Expedition.objects.get(year=year)
logbook_entries = LogbookEntry.objects.filter(expedition=current_expedition).order_by(
"slug"
) # now that slug, aka tripid, is in our standard date form, this will preserve ordering.
print(f" - Logbook to be exported has {len(logbook_entries)} entries in it.")
-
- template = "logbook2005style.html"
try:
- t = loader.get_template(template)
+ t = loader.get_template("logbook2005style.html")
logbookfile = t.render({"logbook_entries": logbook_entries})
except:
print(" ! Very Bad Error RENDERING template " + template)