Ticket #5105: newforms-doc-rest.diff
File newforms-doc-rest.diff, 861 bytes (added by , 17 years ago) |
---|
-
docs/newforms.txt
748 748 >>> f = ContactFormWithMugshot(request.POST, request.FILES) 749 749 750 750 Constructing an unbound form is the same as always -- just omit both 751 form data *and* file data: 751 form data *and* file data:: 752 752 753 753 # Unbound form with a image field 754 754 >>> f = ContactFormWithMugshot() … … 1625 1625 many-to-many data -- is saved without the need for any additional method calls. 1626 1626 For example:: 1627 1627 1628 1629 1628 # Create a form instance with POST data. 1629 >>> f = AuthorForm(request.POST) 1630 1630 1631 1631 # Create and save the new author instance. There's no need to do anything else. 1632 1632 >>> new_author = f.save()