, replace raise with error msg

This commit is contained in:
Philip Sargent 2021-05-13 21:46:29 +03:00
parent ac11c56ca0
commit 6410cc1090

View File

@ -236,8 +236,6 @@ def rendercave(request, cave, slug, cave_id=''):
return r
except:
raise
return render(request,'errors/generic.html', {'cave_editable': editable, 'settings': settings, 'cave': cave, 'cavepage': True,
'cave_id': cave_id, 'svxstem': svxstem, 'svx3d':svx3d})
def cavepage(request, karea, subpath):
@ -262,8 +260,8 @@ def cavepage(request, karea, subpath):
# we should have a -several variant for the cave pages, not just the svxcaves:
return render(request, 'svxcaveseveral.html', {'settings': settings, "caves":caves })
except:
raise
return render(request, 'pagenotfound.html', {'path': path}) # it does not seem possible to set the status_code to '404'
message = f'Failed to find cave: {path}'
return render(request,'errors/generic.html', {'message': message})
def cave(request, cave_id='', offical_name=''):
'''Displays a cave description page