Ticket #5105: newforms-doc-rest.diff

File newforms-doc-rest.diff, 861 bytes (added by Ramiro Morales, 17 years ago)
  • docs/newforms.txt

     
    748748    >>> f = ContactFormWithMugshot(request.POST, request.FILES)
    749749
    750750Constructing an unbound form is the same as always -- just omit both
    751 form data *and* file data:
     751form data *and* file data::
    752752
    753753    # Unbound form with a image field
    754754    >>> f = ContactFormWithMugshot()
     
    16251625many-to-many data -- is saved without the need for any additional method calls.
    16261626For example::
    16271627
    1628         # Create a form instance with POST data.
    1629         >>> f = AuthorForm(request.POST)
     1628    # Create a form instance with POST data.
     1629    >>> f = AuthorForm(request.POST)
    16301630
    16311631    # Create and save the new author instance. There's no need to do anything else.
    16321632    >>> new_author = f.save()
Back to Top