forked from expo/troggle
buxfixes
This commit is contained in:
parent
b9fad1f4fb
commit
cb6619a90a
@ -222,16 +222,16 @@ def rendercave(request, cave, slug, cave_id=''):
|
|||||||
# run this just for the side-effect of generating the 3d file? Nope, crashes.
|
# run this just for the side-effect of generating the 3d file? Nope, crashes.
|
||||||
# TO DO - restructure this so that the regeneration is callable from here.
|
# TO DO - restructure this so that the regeneration is callable from here.
|
||||||
#discard_response = cave3d(request, cave_id=cave_id)
|
#discard_response = cave3d(request, cave_id=cave_id)
|
||||||
|
templatefile = 'cave.html'
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
editable = True
|
editable = True
|
||||||
else:
|
else:
|
||||||
editable = False
|
editable = False
|
||||||
#print(f" ! rendercave:'{cave}' svxstem:{svxstem} caveid:'{cave_id}' svx3d:'{svx3d}'")
|
#print(f" ! rendercave:'{cave}' using template '{templatefile}' svxstem:'{svxstem}' caveid:'{cave_id}' svx3d:'{svx3d}'")
|
||||||
if not cave_id:
|
if not cave_id:
|
||||||
cave_id = slug # cave.unofficial_number
|
cave_id = slug # cave.unofficial_number
|
||||||
try:
|
try:
|
||||||
r = render(request,'cave.html', {'cave_editable': editable, 'settings': settings, 'cave': cave, 'cavepage': True,
|
r = render(request,templatefile, {'cave_editable': editable, 'settings': settings, 'cave': cave, 'cavepage': True,
|
||||||
'cave_id': cave_id, 'svxstem': svxstem, 'svx3d':svx3d})
|
'cave_id': cave_id, 'svxstem': svxstem, 'svx3d':svx3d})
|
||||||
return r
|
return r
|
||||||
except:
|
except:
|
||||||
|
@ -33,7 +33,7 @@ def import_people():
|
|||||||
def import_surveyscans():
|
def import_surveyscans():
|
||||||
print("-- Importing Survey Scans")
|
print("-- Importing Survey Scans")
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
troggle.parsers.surveys.LoadListScans()
|
troggle.parsers.surveys.load_all_scans()
|
||||||
|
|
||||||
def import_logbooks():
|
def import_logbooks():
|
||||||
print("-- Importing Logbooks")
|
print("-- Importing Logbooks")
|
||||||
|
Loading…
Reference in New Issue
Block a user