forked from expo/troggle
prospect and moving code to better places
This commit is contained in:
@@ -354,7 +354,7 @@ def edit_cave(request, slug=None):
|
||||
})
|
||||
|
||||
@login_required_if_public
|
||||
def editEntrance(request, caveslug, slug=None):
|
||||
def edit_entrance(request, 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
|
||||
@@ -362,7 +362,10 @@ def editEntrance(request, caveslug, slug=None):
|
||||
It does save the data into into the database directly, not by parsing the file.
|
||||
'''
|
||||
message = ""
|
||||
cave = Cave.objects.get(caveslug__slug = caveslug)
|
||||
if caveslug is not None:
|
||||
cave = Cave.objects.get(caveslug__slug = caveslug)
|
||||
else:
|
||||
cave = Cave()
|
||||
if slug is not None:
|
||||
entrance = Entrance.objects.get(entranceslug__slug = slug)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user