diff --git a/core/views/caves.py b/core/views/caves.py index 2751ac2..b7143cc 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -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. # TO DO - restructure this so that the regeneration is callable from here. #discard_response = cave3d(request, cave_id=cave_id) - + templatefile = 'cave.html' if request.user.is_authenticated: editable = True else: 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: cave_id = slug # cave.unofficial_number 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}) return r except: diff --git a/parsers/imports.py b/parsers/imports.py index 6eca632..64b829a 100644 --- a/parsers/imports.py +++ b/parsers/imports.py @@ -33,7 +33,7 @@ def import_people(): def import_surveyscans(): print("-- Importing Survey Scans") with transaction.atomic(): - troggle.parsers.surveys.LoadListScans() + troggle.parsers.surveys.load_all_scans() def import_logbooks(): print("-- Importing Logbooks")