diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-01-30 23:04:11 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-01-30 23:04:11 +0000 |
commit | 3aca0d0c76364c8f9fa3fec43370f54f8270b43f (patch) | |
tree | 135ded90255f67bc00bb2c78a832f4328d05c6d9 /core/views/logbooks.py | |
parent | e35fccea5d52bd9f64820335a7bf1dbd38e6157e (diff) | |
download | troggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.tar.gz troggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.tar.bz2 troggle-3aca0d0c76364c8f9fa3fec43370f54f8270b43f.zip |
ruf cleanup imports, bigly.
Diffstat (limited to 'core/views/logbooks.py')
-rw-r--r-- | core/views/logbooks.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/core/views/logbooks.py b/core/views/logbooks.py index 54c48c4..37d6aa9 100644 --- a/core/views/logbooks.py +++ b/core/views/logbooks.py @@ -1,28 +1,15 @@ -import datetime -import os.path -import re -import time - -import django.db.models -from django.db.models import Max, Min -from django.http import HttpResponse, HttpResponseRedirect + from django.shortcuts import render -from django.template import Context, loader -from django.template.defaultfilters import slugify -from django.urls import reverse -from django.utils import timezone from django.views.generic.list import ListView import troggle.settings as settings 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.troggle import Expedition, Person from troggle.core.models.wallets import Wallet from troggle.core.utils import TROG from troggle.parsers.imports import import_logbook -from troggle.parsers.people import GetPersonExpeditionNameLookup -from .auth import login_required_if_public """These views are for logbook items when they appear in an 'expedition' page and for persons: their individual pages and their perseonexpedition pages. @@ -78,7 +65,7 @@ def expedition(request, expeditionname): expo = Expedition.objects.get(year=int(expeditionname)) except: message = ( - f"Expedition not found - database apparently empty, you probably need to do a full re-import of all data." + "Expedition not found - database apparently empty, you probably need to do a full re-import of all data." ) return render(request, "errors/generic.html", {"message": message}) @@ -92,7 +79,7 @@ def expedition(request, expeditionname): ts = TROG["pagecache"]["expedition"] # not much use unless single user! if settings.CACHEDPAGES: - nexpos = len(TROG["pagecache"]["expedition"]) + len(TROG["pagecache"]["expedition"]) # print(f'! - expo {expeditionname} CACHEDPAGES {nexpos} expo pages in cache.') if expeditionname in ts: # print('! - expo {expeditionanme} using cached page') |