2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 08:41:51 +00:00

Renaming class - step 3 complete

This commit is contained in:
Philip Sargent 2023-01-30 16:27:01 +00:00
parent b29ff61871
commit ebe86d73d4
3 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ class Expedition(TroggleModel):
class ExpeditionDay(TroggleModel): class ExpeditionDay(TroggleModel):
"""Exists only on Expedition now. Removed links from logbookentry, persontrip, survex stuff etc. """Exists only on Expedition now. Removed links from logbookentry, personlogentry, survex stuff etc.
""" """
expedition = models.ForeignKey("Expedition",on_delete=models.CASCADE) expedition = models.ForeignKey("Expedition",on_delete=models.CASCADE)
date = models.DateField() date = models.DateField()

View File

@ -166,9 +166,9 @@ def get_person_chronology(personexpedition):
Rewrite more simply with the login in the python, not in Django template language (you bastard Curtis). Rewrite more simply with the login in the python, not in Django template language (you bastard Curtis).
''' '''
res = { } res = { }
for persontrip in personexpedition.persontrip_set.all(): for personlogentry in personexpedition.personlogentry_set.all():
a = res.setdefault(persontrip.logbook_entry.date, { }) a = res.setdefault(personlogentry.logbook_entry.date, { })
a.setdefault("personlogentries", [ ]).append(persontrip) a.setdefault("personlogentries", [ ]).append(personlogentry)
for personrole in personexpedition.survexpersonrole_set.all(): for personrole in personexpedition.survexpersonrole_set.all():
if personrole.survexblock.date: # avoid bad data from another bug if personrole.survexblock.date: # avoid bad data from another bug
@ -227,7 +227,7 @@ def logbookentry(request, date, slug):
# svxothers = None # svxothers = None
svxothers = SurvexBlock.objects.filter(date=date) svxothers = SurvexBlock.objects.filter(date=date)
this_logbookentry=this_logbookentry[0] this_logbookentry=this_logbookentry[0]
# This is the only page that uses persontrip_next and persontrip_prev # This is the only page that uses personlogentry_next and personlogentry_prev
# and it is calculated on the fly in the model # and it is calculated on the fly in the model
return render(request, 'logbookentry.html', return render(request, 'logbookentry.html',
{'logbookentry': this_logbookentry, 'trips': trips, 'svxothers': svxothers, 'wallets': wallets}) {'logbookentry': this_logbookentry, 'trips': trips, 'svxothers': svxothers, 'wallets': wallets})

View File

@ -212,7 +212,7 @@ def tidy_tid(tid, title):
return tid return tid
def store_entry_into_database(date, place, tripcave, title, text, trippersons, author, expedition, logtime_underground, tid): def store_entry_into_database(date, place, tripcave, title, text, trippersons, author, expedition, logtime_underground, tid):
"""saves a single logbook entry and related persontrips """saves a single logbook entry and related personlogentrys
Does NOT save the expeditionday_id - all NULLs. why? Because we are deprecating expeditionday ! Does NOT save the expeditionday_id - all NULLs. why? Because we are deprecating expeditionday !
""" """