diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2021-04-26 02:10:45 +0100 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2021-04-26 02:10:45 +0100 |
commit | 72fa8a5883a12e73402a4d4fda74a7b27faba49d (patch) | |
tree | ac2ff9507a36152a0b2a73e88878acbd568dda01 /core/views/caves.py | |
parent | a656ada67a5b7ff81634f0adcb553de295d624f4 (diff) | |
download | troggle-72fa8a5883a12e73402a4d4fda74a7b27faba49d.tar.gz troggle-72fa8a5883a12e73402a4d4fda74a7b27faba49d.tar.bz2 troggle-72fa8a5883a12e73402a4d4fda74a7b27faba49d.zip |
Making entrances work for pending caves
Diffstat (limited to 'core/views/caves.py')
-rw-r--r-- | core/views/caves.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/views/caves.py b/core/views/caves.py index efccd8f..9d77d33 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -18,7 +18,8 @@ import troggle.settings as settings from troggle.core.views import expo from troggle.core.models.troggle import Expedition, DataIssue from troggle.core.models.caves import CaveSlug, Cave, CaveAndEntrance, QM, EntranceSlug, Entrance, Area, SurvexStation, GetCaveLookup -from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, VersionControlCommentForm, EntranceForm, EntranceLetterForm +from troggle.core.forms import CaveForm, CaveAndEntranceFormSet, EntranceForm, EntranceLetterForm +#from troggle.core.forms import VersionControlCommentForm from .login import login_required_if_public '''Manages the complex procedures to assemble a cave description out of the compnoents @@ -323,7 +324,7 @@ def edit_cave(request, slug=None): if request.POST: form = CaveForm(request.POST, instance=cave) ceFormSet = CaveAndEntranceFormSet(request.POST) - versionControlForm = VersionControlCommentForm(request.POST) + #versionControlForm = VersionControlCommentForm(request.POST) if form.is_valid() and ceFormSet.is_valid(): #print(f'! POST is valid. {cave}') cave = form.save(commit = False) @@ -397,8 +398,6 @@ def edit_entrance(request, caveslug=None, slug=None): slugname = cave.slug() + entletter.cleaned_data["entrance_letter"] else: slugname = cave.slug() - # Converting a PENDING cave to a real cave by saving this form - slugname = slugname.replace('-PENDING-', '-') entrance.cached_primary_slug = slugname entrance.filename = slugname + ".html" entrance.save() |