From 2091eb8e8bbeddb8b7ca57f4bd0032ece60618e6 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Tue, 28 Mar 2023 14:19:06 +0100 Subject: [PATCH] remove unused versionControlForm --- core/views/caves.py | 6 ------ templates/editcave.html | 3 +-- templates/editentrance.html | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/core/views/caves.py b/core/views/caves.py index 2f5a0ce..af59bc9 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -346,7 +346,6 @@ def edit_cave(request, path="", slug=None): if request.POST: form = CaveForm(request.POST, instance=cave) ceFormSet = CaveAndEntranceFormSet(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) @@ -391,7 +390,6 @@ def edit_cave(request, path="", slug=None): else: form = CaveForm(instance=cave) ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all()) - # versionControlForm = VersionControlCommentForm() return render( request, @@ -401,7 +399,6 @@ def edit_cave(request, path="", slug=None): "cave": cave, "message": message, "caveAndEntranceFormSet": ceFormSet, - #'versionControlForm': versionControlForm }, ) @@ -433,7 +430,6 @@ def edit_entrance(request, path="", caveslug=None, slug=None): if request.POST: form = EntranceForm(request.POST, instance=entrance) entletter = EntranceLetterForm(request.POST, instance=caveAndEntrance) - # versionControlForm = VersionControlCommentForm(request.POST) if form.is_valid() and entletter.is_valid(): entrance = form.save(commit=False) entrance_letter = entletter.save(commit=False) @@ -457,7 +453,6 @@ def edit_entrance(request, path="", caveslug=None, slug=None): return HttpResponseRedirect("/" + cave.url) else: form = EntranceForm(instance=entrance) - # versionControlForm = VersionControlCommentForm() if slug is None: entletter = EntranceLetterForm() else: @@ -469,7 +464,6 @@ def edit_entrance(request, path="", caveslug=None, slug=None): { "form": form, "cave": cave, - #'versionControlForm': versionControlForm, "entletter": entletter, "entlettereditable": entlettereditable, }, diff --git a/templates/editcave.html b/templates/editcave.html index 0f0b37c..75033b3 100644 --- a/templates/editcave.html +++ b/templates/editcave.html @@ -8,8 +8,7 @@ {% include 'html_editor_pop_ups.html' %}

{{message}}

{% csrf_token %} - {{ form }}{{caveAndEntranceFormSet}}
- {{ versionControlForm }} + {{ form }}{{caveAndEntranceFormSet}}

diff --git a/templates/editentrance.html b/templates/editentrance.html index 138abeb..fc85e99 100644 --- a/templates/editentrance.html +++ b/templates/editentrance.html @@ -15,7 +15,6 @@
Entrance Letter{{ entletter }}
{% endif %} {{ form }}
- {{ versionControlForm }}