forked from expo/troggle
Remove unneeded Class ExpeditionDay
This commit is contained in:
@@ -103,7 +103,7 @@ def expedition(request, expeditionname):
|
||||
allpersonlogentries = PersonLogEntry.objects.filter(personexpedition__expedition=expo)
|
||||
|
||||
|
||||
personexpeditiondays = [ ]
|
||||
personexpodays = [ ]
|
||||
for personexpedition in expo.personexpedition_set.all():
|
||||
expotrips = allpersonlogentries.filter(personexpedition=personexpedition) # lazy
|
||||
expoblocks = blocks.filter(survexpersonrole__personexpedition=personexpedition)
|
||||
@@ -119,12 +119,12 @@ def expedition(request, expeditionname):
|
||||
if issunday := (date.weekday() == 6): # WALRUS
|
||||
pcell["sunday"] = issunday
|
||||
prow.append(pcell)
|
||||
personexpeditiondays.append({"personexpedition":personexpedition, "personrow":prow})
|
||||
personexpodays.append({"personexpedition":personexpedition, "personrow":prow})
|
||||
|
||||
|
||||
ts[expeditionname] = {'expedition': expo,
|
||||
'expeditions':expeditions,
|
||||
'personexpeditiondays':personexpeditiondays, 'settings':settings,
|
||||
'personexpodays':personexpodays, 'settings':settings,
|
||||
'dateditems': dateditems, 'dates':dates}
|
||||
TROG['pagecache']['expedition'][expeditionname] = ts[expeditionname]
|
||||
|
||||
@@ -219,15 +219,10 @@ def logbookentry(request, date, slug):
|
||||
jwallets = allwallets.filter(walletdate=date)
|
||||
for j in jwallets:
|
||||
wallets.add(j)
|
||||
# thisexpo = Expedition.objects.get(year=int(date[0:4]))
|
||||
# if thisexpo:
|
||||
# #expeditionday = thisexpo.get_expedition_day(date)
|
||||
# svxothers = SurvexBlock.objects.filter(date=date)
|
||||
# else:
|
||||
# svxothers = None
|
||||
|
||||
svxothers = SurvexBlock.objects.filter(date=date)
|
||||
this_logbookentry=this_logbookentry[0]
|
||||
# This is the only page that uses personlogentry_next and personlogentry_prev
|
||||
# This is the only page that uses next_.. and prev_..
|
||||
# and it is calculated on the fly in the model
|
||||
return render(request, 'logbookentry.html',
|
||||
{'logbookentry': this_logbookentry, 'trips': trips, 'svxothers': svxothers, 'wallets': wallets})
|
||||
|
||||
Reference in New Issue
Block a user