Skip to content

Commit

Permalink
Fixed django#14917 -- Hinted that view should redirect after form pos…
Browse files Browse the repository at this point in the history
…t success
  • Loading branch information
claudep committed Jun 23, 2012
1 parent e0fce87 commit 19a810b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/topics/forms/modelforms.txt
Expand Up @@ -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", {
Expand Down

0 comments on commit 19a810b

Please sign in to comment.