forked from expo/troggle
remove unused versionControlForm
This commit is contained in:
parent
860ce6b065
commit
2091eb8e8b
@ -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,
|
||||
},
|
||||
|
@ -8,8 +8,7 @@
|
||||
{% include 'html_editor_pop_ups.html' %}
|
||||
<h2>{{message}}</h2>
|
||||
<form action="" method="post">{% csrf_token %}
|
||||
<table>{{ form }}{{caveAndEntranceFormSet}}</table>
|
||||
{{ versionControlForm }}
|
||||
<table>{{ form }}<!--1-->{{caveAndEntranceFormSet}}<!--2--></table>
|
||||
<p><input type="submit" value="Submit" /></p>
|
||||
</form>
|
||||
|
||||
|
@ -15,7 +15,6 @@
|
||||
<table><tr><th>Entrance Letter</th><td>{{ entletter }}</td></table>
|
||||
{% endif %}
|
||||
<table>{{ form }}</table>
|
||||
{{ versionControlForm }}
|
||||
<p><input type="submit" value="Submit" /></p>
|
||||
</form>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user