Fixed #14917 -- Hinted that view should redirect after form post success
This commit is contained in:
parent
e0fce8706d
commit
19a810b18c
|
@ -877,7 +877,8 @@ of a model. Here's how you can do that::
|
||||||
formset = BookInlineFormSet(request.POST, request.FILES, instance=author)
|
formset = BookInlineFormSet(request.POST, request.FILES, instance=author)
|
||||||
if formset.is_valid():
|
if formset.is_valid():
|
||||||
formset.save()
|
formset.save()
|
||||||
# Do something.
|
# Do something. Should generally end with a redirect. For example:
|
||||||
|
return HttpResponseRedirect(author.get_absolute_url())
|
||||||
else:
|
else:
|
||||||
formset = BookInlineFormSet(instance=author)
|
formset = BookInlineFormSet(instance=author)
|
||||||
return render_to_response("manage_books.html", {
|
return render_to_response("manage_books.html", {
|
||||||
|
|
Loading…
Reference in New Issue