From 19a810b18cacea12f201b5a235d1af9218d9c2e9 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 23 Jun 2012 18:44:40 +0200 Subject: [PATCH] Fixed #14917 -- Hinted that view should redirect after form post success --- docs/topics/forms/modelforms.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index eb53b177c5..4cfde400a7 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -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", {