summaryrefslogtreecommitdiffstats
path: root/core/views/logbooks.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-01-30 16:18:19 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-01-30 16:18:19 +0000
commitb29ff618718f4d28ae4e5ae338ef0cf7dfb764b9 (patch)
tree3fbbb69224491cc6feca4e31e1f0944b6263fe51 /core/views/logbooks.py
parent58f7cf72d48a89e3bfe32bbde6b47f263121e232 (diff)
downloadtroggle-b29ff618718f4d28ae4e5ae338ef0cf7dfb764b9.tar.gz
troggle-b29ff618718f4d28ae4e5ae338ef0cf7dfb764b9.tar.bz2
troggle-b29ff618718f4d28ae4e5ae338ef0cf7dfb764b9.zip
Renaming class step 2
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r--core/views/logbooks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py
index 47aa7e1..4daede9 100644
--- a/core/views/logbooks.py
+++ b/core/views/logbooks.py
@@ -14,7 +14,7 @@ from django.utils import timezone
from django.views.generic.list import ListView
import troggle.settings as settings
-from troggle.core.models.logbooks import LogbookEntry, PersonTrip
+from troggle.core.models.logbooks import LogbookEntry, PersonLogEntry
from troggle.core.models.survex import SurvexBlock
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
from troggle.core.models.wallets import Wallet
@@ -64,8 +64,8 @@ def expedition(request, expeditionname):
Remember that 'personexpedition__expedition' is interpreted by Django to mean the
'expedition' object which is connected by a foreign key to the 'personexpedition'
- object, which is a field of the PersonTrip object:
- PersonTrip.objects.filter(personexpedition__expedition=expo)
+ object, which is a field of the PersonLogEntry object:
+ PersonLogEntry.objects.filter(personexpedition__expedition=expo)
Queries are not evaluated to hit the database until a result is actually used. Django
does lazy evaluation.
@@ -100,7 +100,7 @@ def expedition(request, expeditionname):
dateditems = list(entries) + list(blocks) # evaluates the Django query and hits db
dates = sorted(set([item.date for item in dateditems]))
- allpersonlogentries = PersonTrip.objects.filter(personexpedition__expedition=expo)
+ allpersonlogentries = PersonLogEntry.objects.filter(personexpedition__expedition=expo)
personexpeditiondays = [ ]