Ticket #19477: 19477.diff

File 19477.diff, 1.8 KB (added by Tim Graham, 12 years ago)
  • docs/ref/contrib/contenttypes.txt

    diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
    index e9cd5e7..6946ece 100644
    a b The :mod:`django.contrib.contenttypes.generic` module provides  
    457457:class:`~django.contrib.contenttypes.generic.GenericTabularInline`
    458458and :class:`~django.contrib.contenttypes.generic.GenericStackedInline`
    459459(the last two are subclasses of
    460 :class:`~django.contrib.contenttypes.generic.GenericInlineModelAdmin`).
    461 This enables the use of generic relations in forms and the admin. See the
    462 :doc:`model formset </topics/forms/modelforms>` and
     460:class:`~django.contrib.contenttypes.generic.GenericInlineModelAdmin`), as
     461well as a formset factory, :func:`generic_inlineformset_factory`, for use with
     462:class:`GenericForeignKey`. This enables the use of generic relations in forms
     463and the admin. See the :doc:`model formset </topics/forms/modelforms>` and
    463464:ref:`admin <using-generic-relations-as-an-inline>` documentation for more
    464465information.
    465466
    information.  
    486487
    487488    Subclasses of :class:`GenericInlineModelAdmin` with stacked and tabular
    488489    layouts, respectively.
     490
     491.. function:: generic_inlineformset_factory(model, form=ModelForm, formset=BaseGenericInlineFormSet, ct_field="content_type", fk_field="object_id", fields=None, exclude=None, extra=3, can_order=False, can_delete=True, max_num=None, formfield_callback=None)
     492
     493    Returns an ``GenericInlineFormSet``.
     494
     495    You must provide ``ct_field`` and ``object_id`` if they different from the
     496    defaults, ``content_type`` and ``object_id`` respectively. Other parameters
     497    are similar to those documented in
     498    :func:`~django.forms.models.modelformset_factory` and
     499    :func:`~django.forms.models.inlineformset_factory`.
Back to Top