summaryrefslogtreecommitdiffstats
path: root/core/views
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-01-29 21:45:51 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2023-01-29 21:45:51 +0000
commit89d0e1723ec57c5472eb1073fc1af5bb587bb7dc (patch)
tree3961e6b64b64e64ef190092cdde878c63e8167e4 /core/views
parent226cbb6b5cb9d38b2856a3007745c8045ed9efae (diff)
downloadtroggle-89d0e1723ec57c5472eb1073fc1af5bb587bb7dc.tar.gz
troggle-89d0e1723ec57c5472eb1073fc1af5bb587bb7dc.tar.bz2
troggle-89d0e1723ec57c5472eb1073fc1af5bb587bb7dc.zip
fixing cyclic import problem
Diffstat (limited to 'core/views')
-rw-r--r--core/views/caves.py4
-rw-r--r--core/views/logbooks.py15
-rw-r--r--core/views/uploads.py5
3 files changed, 11 insertions, 13 deletions
diff --git a/core/views/caves.py b/core/views/caves.py
index b7b800a..df85579 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -18,9 +18,9 @@ import troggle.settings as settings
from troggle.core.forms import (CaveAndEntranceFormSet, CaveForm, EntranceForm,
EntranceLetterForm)
from troggle.core.models.caves import (Area, Cave, CaveAndEntrance,
- CaveSlug, Entrance, EntranceSlug,
+ Entrance, EntranceSlug,
GetCaveLookup, SurvexStation)
-from troggle.core.models.logbooks import QM
+from troggle.core.models.logbooks import CaveSlug, QM
from troggle.core.models.troggle import DataIssue, Expedition
from troggle.core.utils import write_and_commit, writetrogglefile
from troggle.core.views import expo
diff --git a/core/views/logbooks.py b/core/views/logbooks.py
index c1ba965..a0a2efe 100644
--- a/core/views/logbooks.py
+++ b/core/views/logbooks.py
@@ -17,6 +17,7 @@ import troggle.settings as settings
from troggle.core.models.logbooks import LogbookEntry, PersonTrip
from troggle.core.models.survex import SurvexBlock
from troggle.core.models.troggle import Expedition, Person, PersonExpedition
+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
@@ -206,13 +207,13 @@ def logbookentry(request, date, slug):
jwallets = allwallets.filter(walletdate=date)
for j in jwallets:
wallets.add(j)
- thisexpo = this_expedition = Expedition.objects.get(year=int(date[0:4]))
- if thisexpo:
- expeditionday = thisexpo.get_expedition_day(date)
- svxothers = SurvexBlock.objects.filter(expeditionday=expeditionday)
- else:
- svxothers = None
-
+ # 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 presontrip_next and persontrip_prev
# and it is calculated on the fly in the model
diff --git a/core/views/uploads.py b/core/views/uploads.py
index cceafc9..63f6de3 100644
--- a/core/views/uploads.py
+++ b/core/views/uploads.py
@@ -655,10 +655,7 @@ def scanupload(request, path=None):
thisexpo = Expedition.objects.get(year=int(year))
if samedate:
- expeditionday = thisexpo.get_expedition_day(samedate)
- #print(f' - {thisexpo=} {expeditionday=}')
- svxothers = SurvexBlock.objects.filter(expeditionday=expeditionday)
- #print(f' - {thisexpo=} {expeditionday=} {svxothers=}')
+ svxothers = SurvexBlock.objects.filter(date=samedate)
trips = LogbookEntry.objects.filter(date=samedate)
else:
svxothers = None