summaryrefslogtreecommitdiffstats
path: root/core/views
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-01-30 16:42:56 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-01-30 16:42:56 +0000
commita12f666e96ecb0c63aed4e64b49d303e9e717d32 (patch)
treeba0a1e949fa0540efcd0f431fb24d6b12231aaaf /core/views
parentebe86d73d430b9d2d628262cf5a3539af9fd0fe7 (diff)
downloadtroggle-a12f666e96ecb0c63aed4e64b49d303e9e717d32.tar.gz
troggle-a12f666e96ecb0c63aed4e64b49d303e9e717d32.tar.bz2
troggle-a12f666e96ecb0c63aed4e64b49d303e9e717d32.zip
Remove unneeded Class ExpeditionDay
Diffstat (limited to 'core/views')
-rw-r--r--core/views/logbooks.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py
index b7ad2bc..40984bf 100644
--- a/core/views/logbooks.py
+++ b/core/views/logbooks.py
@@ -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})