Ticket #9780: t9780-r9626.diff

File t9780-r9626.diff, 1.9 KB (added by Ramiro Morales, 16 years ago)
  • docs/topics/forms/formsets.txt

    diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt
    a b  
    109109
    110110As we can see the formset properly performed validation and gave us the
    111111expected errors.
     112
     113.. _understanding-the-managementform:
    112114
    113115Understanding the ManagementForm
    114116~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • docs/topics/forms/modelforms.txt

    diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
    a b  
    196196``commit=False``, then it will return an object that hasn't yet been saved to
    197197the database. In this case, it's up to you to call ``save()`` on the resulting
    198198model instance. This is useful if you want to do custom processing on the
    199 object before saving it, or if you want to use on of the specialised
     199object before saving it, or if you want to use one of the specialised
    200200:ref:`model saving options <ref-models-force-insert>`. ``commit`` is ``True`` by default.
    201201
    202202Another side effect of using ``commit=False`` is seen when your model has
     
    272272        class Meta:
    273273            model = Author
    274274            fields = ('name', 'title')
    275    
     275
    276276    class PartialAuthorForm(ModelForm):
    277277        class Meta:
    278278            model = Author
     
    429429method::
    430430
    431431    from django.forms.models import BaseModelFormSet
    432    
     432
    433433    class BaseAuthorFormSet(BaseModelFormSet):
    434434        def get_queryset(self):
    435435            return super(BaseAuthorFormSet, self).get_queryset().filter(name__startswith='O')
     
    496496
    497497    >>> Author.objects.order_by('name')
    498498    [<Author: Charles Baudelaire>, <Author: Paul Verlaine>, <Author: Walt Whitman>]
    499    
     499
    500500    >>> AuthorFormSet = modelformset_factory(Author, max_num=2, extra=1)
    501501    >>> formset = AuthorFormSet(queryset=Author.objects.order_by('name'))
    502502    >>> formset.initial
Back to Top