summaryrefslogtreecommitdiffstats
path: root/core/views/caves.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/caves.py')
-rw-r--r--core/views/caves.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/views/caves.py b/core/views/caves.py
index 250ae0e..8727c03 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -353,7 +353,7 @@ def cavepage(request, karea=None, subpath=None, 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
- Warning. This uses Django deep magic.
+ Warning. This uses Django deep magic in the CaveForm processing.
It saves the data into into the database and into the html file, which it then commits to git.
"""
@@ -372,9 +372,9 @@ def edit_cave(request, path="", slug=None):
# print(f'! POST is valid. {cave}')
cave = form.save(commit=False)
if not cave.filename:
- cave.filename = form.get_area() + "-" + cave.number() + ".html"
+ cave.filename = cave.areacode + "-" + cave.number() + ".html"
if not cave.url:
- cave.url = form.get_area() + "/" + cave.number() + ".html"
+ cave.url = cave.areacode + "/" + cave.number()
cave.save()
form.save_m2m()
if slug is None: