0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #14917 -- Hinted that view should redirect after form post success

This commit is contained in:
Claude Paroz 2012-06-23 18:44:40 +02:00
parent e0fce8706d
commit 19a810b18c

View File

@ -877,7 +877,8 @@ of a model. Here's how you can do that::
formset = BookInlineFormSet(request.POST, request.FILES, instance=author)
if formset.is_valid():
formset.save()
# Do something.
# Do something. Should generally end with a redirect. For example:
return HttpResponseRedirect(author.get_absolute_url())
else:
formset = BookInlineFormSet(instance=author)
return render_to_response("manage_books.html", {