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:
|
if request.POST:
|
||||||
form = CaveForm(request.POST, instance=cave)
|
form = CaveForm(request.POST, instance=cave)
|
||||||
ceFormSet = CaveAndEntranceFormSet(request.POST)
|
ceFormSet = CaveAndEntranceFormSet(request.POST)
|
||||||
# versionControlForm = VersionControlCommentForm(request.POST)
|
|
||||||
if form.is_valid() and ceFormSet.is_valid():
|
if form.is_valid() and ceFormSet.is_valid():
|
||||||
# print(f'! POST is valid. {cave}')
|
# print(f'! POST is valid. {cave}')
|
||||||
cave = form.save(commit=False)
|
cave = form.save(commit=False)
|
||||||
@ -391,7 +390,6 @@ def edit_cave(request, path="", slug=None):
|
|||||||
else:
|
else:
|
||||||
form = CaveForm(instance=cave)
|
form = CaveForm(instance=cave)
|
||||||
ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all())
|
ceFormSet = CaveAndEntranceFormSet(queryset=cave.caveandentrance_set.all())
|
||||||
# versionControlForm = VersionControlCommentForm()
|
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
@ -401,7 +399,6 @@ def edit_cave(request, path="", slug=None):
|
|||||||
"cave": cave,
|
"cave": cave,
|
||||||
"message": message,
|
"message": message,
|
||||||
"caveAndEntranceFormSet": ceFormSet,
|
"caveAndEntranceFormSet": ceFormSet,
|
||||||
#'versionControlForm': versionControlForm
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -433,7 +430,6 @@ def edit_entrance(request, path="", caveslug=None, slug=None):
|
|||||||
if request.POST:
|
if request.POST:
|
||||||
form = EntranceForm(request.POST, instance=entrance)
|
form = EntranceForm(request.POST, instance=entrance)
|
||||||
entletter = EntranceLetterForm(request.POST, instance=caveAndEntrance)
|
entletter = EntranceLetterForm(request.POST, instance=caveAndEntrance)
|
||||||
# versionControlForm = VersionControlCommentForm(request.POST)
|
|
||||||
if form.is_valid() and entletter.is_valid():
|
if form.is_valid() and entletter.is_valid():
|
||||||
entrance = form.save(commit=False)
|
entrance = form.save(commit=False)
|
||||||
entrance_letter = entletter.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)
|
return HttpResponseRedirect("/" + cave.url)
|
||||||
else:
|
else:
|
||||||
form = EntranceForm(instance=entrance)
|
form = EntranceForm(instance=entrance)
|
||||||
# versionControlForm = VersionControlCommentForm()
|
|
||||||
if slug is None:
|
if slug is None:
|
||||||
entletter = EntranceLetterForm()
|
entletter = EntranceLetterForm()
|
||||||
else:
|
else:
|
||||||
@ -469,7 +464,6 @@ def edit_entrance(request, path="", caveslug=None, slug=None):
|
|||||||
{
|
{
|
||||||
"form": form,
|
"form": form,
|
||||||
"cave": cave,
|
"cave": cave,
|
||||||
#'versionControlForm': versionControlForm,
|
|
||||||
"entletter": entletter,
|
"entletter": entletter,
|
||||||
"entlettereditable": entlettereditable,
|
"entlettereditable": entlettereditable,
|
||||||
},
|
},
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
{% include 'html_editor_pop_ups.html' %}
|
{% include 'html_editor_pop_ups.html' %}
|
||||||
<h2>{{message}}</h2>
|
<h2>{{message}}</h2>
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
<table>{{ form }}{{caveAndEntranceFormSet}}</table>
|
<table>{{ form }}<!--1-->{{caveAndEntranceFormSet}}<!--2--></table>
|
||||||
{{ versionControlForm }}
|
|
||||||
<p><input type="submit" value="Submit" /></p>
|
<p><input type="submit" value="Submit" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
<table><tr><th>Entrance Letter</th><td>{{ entletter }}</td></table>
|
<table><tr><th>Entrance Letter</th><td>{{ entletter }}</td></table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<table>{{ form }}</table>
|
<table>{{ form }}</table>
|
||||||
{{ versionControlForm }}
|
|
||||||
<p><input type="submit" value="Submit" /></p>
|
<p><input type="submit" value="Submit" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user