Ticket #10508: 10508.diff
File 10508.diff, 1.2 KB (added by , 16 years ago) |
---|
-
docs/topics/forms/formsets.txt
296 296 297 297 Using a formset inside a view is as easy as using a regular ``Form`` class. 298 298 The only thing you will want to be aware of is making sure to use the 299 management form inside the template. Let s look at a sample view::299 management form inside the template. Let's look at a sample view: 300 300 301 .. code-block:: python 302 301 303 def manage_articles(request): 302 304 ArticleFormSet = formset_factory(ArticleForm) 303 305 if request.method == 'POST': … … 341 343 borrow much of its behavior from forms. With that said you are able to use 342 344 ``prefix`` to prefix formset form field names with a given value to allow 343 345 more than one formset to be sent to a view without name clashing. Lets take 344 a look at how this might be accomplished: :346 a look at how this might be accomplished: 345 347 348 .. code-block:: python 349 346 350 def manage_articles(request): 347 351 ArticleFormSet = formset_factory(ArticleForm) 348 352 BookFormSet = formset_factory(BookForm)