diff options
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r-- | core/views/logbooks.py | 8 |
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 = [ ] |