Ticket #19640: 19640.diff

File 19640.diff, 1.9 KB (added by Tim Graham, 12 years ago)
  • docs/ref/forms/models.txt

    diff --git a/docs/ref/forms/models.txt b/docs/ref/forms/models.txt
    index 1f4a0d0..3bbebc0 100644
    a b Model Form Functions  
    55.. module:: django.forms.models
    66   :synopsis: Django's functions for building model forms and formsets.
    77
    8 .. method:: modelform_factory(model, form=ModelForm, fields=None, exclude=None, formfield_callback=None,  widgets=None)
     8.. function:: modelform_factory(model, form=ModelForm, fields=None, exclude=None, formfield_callback=None,  widgets=None)
    99
    1010    Returns a :class:`~django.forms.ModelForm` class for the given ``model``.
    1111    You can optionally pass a ``form`` argument to use as a starting point for
    Model Form Functions  
    2525
    2626    See :ref:`modelforms-factory` for example usage.
    2727
    28 .. method:: modelformset_factory(model, form=ModelForm, formfield_callback=None, formset=BaseModelFormSet, extra=1, can_delete=False, can_order=False, max_num=None, fields=None, exclude=None)
     28.. function:: modelformset_factory(model, form=ModelForm, formfield_callback=None, formset=BaseModelFormSet, extra=1, can_delete=False, can_order=False, max_num=None, fields=None, exclude=None)
    2929
    3030    Returns a ``FormSet`` class for the given ``model`` class.
    3131
    Model Form Functions  
    3838    :ref:`formsets` for details.
    3939
    4040    See :ref:`model-formsets` for example usage.
     41
     42.. function:: inlineformset_factory(parent_model, model, form=ModelForm, formset=BaseInlineFormSet, fk_name=None, fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None)
     43
     44    Returns an ``InlineFormSet`` using :func:`modelformset_factory` with
     45    defaults of ``formset=BaseInlineFormSet``, ``can_delete=True``, and
     46    ``extra=3``.
     47
     48    If your model has more than one :class:`~django.db.models.ForeignKey` to
     49    the ``parent_model``, you must specify a ``fk_name``.
Back to Top