mirror of
https://github.com/django/django.git
synced 2024-11-30 07:06:18 +01:00
Fixed #14993 - Improved docs for ModelAdmin.filter_horizontal adding that it's for ManyToManyFields; thanks jammon for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
40ea1fb0d7
commit
fe0a15b6c9
@ -263,15 +263,20 @@ subclass::
|
|||||||
|
|
||||||
.. attribute:: ModelAdmin.filter_horizontal
|
.. attribute:: ModelAdmin.filter_horizontal
|
||||||
|
|
||||||
Use a nifty unobtrusive JavaScript "filter" interface instead of the
|
By default, a :class:`~django.db.models.ManyToManyField` is displayed in
|
||||||
usability-challenged ``<select multiple>`` in the admin form. The value is
|
the admin site with a ``<select multiple>``. However, multiple-select boxes
|
||||||
a list of fields that should be displayed as a horizontal filter interface.
|
can be difficult to use when selecting many items. Adding a
|
||||||
See ``filter_vertical`` to use a vertical interface.
|
:class:`~django.db.models.ManyToManyField` to this list will instead use
|
||||||
|
a nifty unobtrusive JavaScript "filter" interface that allows searching
|
||||||
|
within the options. The unselected and selected options appear in two boxes
|
||||||
|
side by side. See :attr:`~ModelAdmin.filter_vertical` to use a vertical
|
||||||
|
interface.
|
||||||
|
|
||||||
.. attribute:: ModelAdmin.filter_vertical
|
.. attribute:: ModelAdmin.filter_vertical
|
||||||
|
|
||||||
Same as ``filter_horizontal``, but is a vertical display of the filter
|
Same as :attr:`~ModelAdmin.filter_horizontal`, but uses a vertical display
|
||||||
interface.
|
of the filter interface with the box of unselected options appearing above
|
||||||
|
the box of selected options.
|
||||||
|
|
||||||
.. attribute:: ModelAdmin.form
|
.. attribute:: ModelAdmin.form
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user