summaryrefslogtreecommitdiffstats
path: root/core/views/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-09-11 20:38:14 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-09-11 20:38:14 +0300
commitd323ff270083ead337f8297653bb833100306999 (patch)
treecb234cd494092c14f5f878bbc2cf060b8a5f85a9 /core/views/caves.py
parent47db19f1a24d22610de2a5782737650f4b0941dc (diff)
downloadtroggle-d323ff270083ead337f8297653bb833100306999.tar.gz
troggle-d323ff270083ead337f8297653bb833100306999.tar.bz2
troggle-d323ff270083ead337f8297653bb833100306999.zip
debugging Cave page links..
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: