Commit d5f1736d authored by Sean Marlow's avatar Sean Marlow Committed by Tim Graham
Browse files

[1.9.x] Fixed #26837 -- Documented ModelMultipleChoiceField.to_field_name

Backport of 8b9e16ec from master
parent 76ba451d
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1236,13 +1236,19 @@ method::
    Allows the selection of one or more model objects, suitable for
    representing a many-to-many relation. As with :class:`ModelChoiceField`,
    you can use ``label_from_instance`` to customize the object
    representations, and ``queryset`` is a required parameter:
    representations.

    A single argument is required:

    .. attribute:: queryset

        A ``QuerySet`` of model objects from which the choices for the
        field will be derived, and which will be used to validate the
        user's selection.
        Same as :class:`ModelChoiceField.queryset`.

    Takes one optional argument:

    .. attribute:: to_field_name

        Same as :class:`ModelChoiceField.to_field_name`.

Creating custom fields
======================