Ticket #10508: 10508.diff

File 10508.diff, 1.2 KB (added by Matt Boersma, 15 years ago)

Patch to turn on code highlighting for two sections in the topics/auth document

  • docs/topics/forms/formsets.txt

     
    296296
    297297Using a formset inside a view is as easy as using a regular ``Form`` class.
    298298The only thing you will want to be aware of is making sure to use the
    299 management form inside the template. Lets look at a sample view::
     299management form inside the template. Let's look at a sample view:
    300300
     301.. code-block:: python
     302
    301303    def manage_articles(request):
    302304        ArticleFormSet = formset_factory(ArticleForm)
    303305        if request.method == 'POST':
     
    341343borrow much of its behavior from forms. With that said you are able to use
    342344``prefix`` to prefix formset form field names with a given value to allow
    343345more than one formset to be sent to a view without name clashing. Lets take
    344 a look at how this might be accomplished::
     346a look at how this might be accomplished:
    345347
     348.. code-block:: python
     349
    346350    def manage_articles(request):
    347351        ArticleFormSet = formset_factory(ArticleForm)
    348352        BookFormSet = formset_factory(BookForm)
Back to Top