mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 07:40:19 +00:00
fixing ,, bug in logbook rewriting, and fixing persons order
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user