mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 14:28:09 +00:00
fixing cyclic import problem
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user