2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-14 21:57:09 +00:00

Renaming class step 2

This commit is contained in:
2023-01-30 16:18:19 +00:00
parent 58f7cf72d4
commit b29ff61871
12 changed files with 22 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ from django.template.defaultfilters import slugify
from parsers.people import GetPersonExpeditionNameLookup, load_people_expos
from troggle.core.models.caves import GetCaveLookup
from troggle.core.models.logbooks import LogbookEntry, PersonTrip
from troggle.core.models.logbooks import LogbookEntry, PersonLogEntry
from troggle.core.models.troggle import DataIssue, Expedition
from troggle.core.utils import get_process_memory
@@ -235,7 +235,7 @@ def store_entry_into_database(date, place, tripcave, title, text, trippersons, a
for tripperson, time_underground in trippersons:
lookupAttribs = {"personexpedition": tripperson, "logbook_entry": lbo}
nonLookupAttribs = {"time_underground": time_underground, "is_logbook_entry_author": (tripperson == author)}
pt = PersonTrip.objects.create(**nonLookupAttribs, **lookupAttribs)
pt = PersonLogEntry.objects.create(**nonLookupAttribs, **lookupAttribs)
def parser_date(tripdate, year):
"""Interprets dates in the expo logbooks and returns a correct datetime.date object"""
@@ -668,7 +668,7 @@ def LoadLogbooks():
# Now we serially store the parsed data in the database, updating 3 types of object:
# - Expedition (the 'logbook.html' value)
# - LogBookEntry (text, who when etc.)
# - PersonTrip (who was on that specific trip mentione din the logbook entry)
# - PersonLogEntry (who was on that specific trip mentione din the logbook entry)
for entrytuple in allentries:
date, place, tripcave, triptitle, text, trippersons, author, expedition, tu, tid = entrytuple
store_entry_into_database(date, place, tripcave, triptitle, text, trippersons, author, expedition, tu, tid)