2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 07:47:20 +00:00

edit entrances within the correct url parent

This commit is contained in:
Martin Green
2022-07-31 21:29:17 +02:00
parent 94252a94fe
commit fa6758b9a0
4 changed files with 29 additions and 12 deletions

View File

@@ -276,8 +276,11 @@ def cavepage(request, karea, subpath):
r = rendercave(request, cave, cave.slug())
return r
except NoReverseMatch:
message = f'Failed to render cave: {kpath} (it does exist and is unique) because of a Django URL resolution error. Check urls.py.'
return render(request,'errors/generic.html', {'message': message})
if settings.DEBUG:
raise
else:
message = f'Failed to render cave: {kpath} (it does exist and is unique) because of a Django URL resolution error. Check urls.py.'
return render(request,'errors/generic.html', {'message': message})
except:
# anything else is a new problem. Add in specific error messages here as we discover new types of error
raise
@@ -365,7 +368,7 @@ def edit_cave(request, path = "", slug=None):
})
@login_required_if_public
def edit_entrance(request, caveslug=None, slug=None):
def edit_entrance(request, path = "", caveslug=None, slug=None):
'''This is the form that edits the entrance data for a single entrance and writes out
an XML file in the :expoweb: repo folder
The format for the file being saved is in templates/dataformat/entrance.xml