summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/models/caves.py3
-rw-r--r--core/views/caves.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/core/models/caves.py b/core/models/caves.py
index 8cd658c..20a7a96 100644
--- a/core/models/caves.py
+++ b/core/models/caves.py
@@ -145,6 +145,9 @@ class Cave(TroggleModel):
#return settings.URL_ROOT + '/cave/' + href + '/'
#return urljoin(settings.URL_ROOT, reverse('cave',kwargs={'cave_id':href,})) # WRONG. This produces /cave/161 and should be /1623/161
return Path(settings.URL_ROOT) / self.url # not good Django style.. NEEDS actual URL
+
+ def url_parent(self):
+ return self.url.rsplit("/", 1)[0]
def __str__(self, sep = ": "):
return str(self.slug())
diff --git a/core/views/caves.py b/core/views/caves.py
index 44dbb80..b56eacb 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -294,7 +294,7 @@ def caveEntrance(request, slug):
return render(request,'cave_entrances.html', {'cave': cave})
@login_required_if_public
-def edit_cave(request, slug=None):
+def edit_cave(request, path = "", slug=None):
'''This is the form that edits all the cave data and writes out an XML file in the :expoweb: repo folder
The format for the file being saved is in templates/dataformat/cave.xml