mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Added ModelAdmin.get_search_fields.
This commit is contained in:
parent
a0c58113b9
commit
0bcdcc7eb9
5 changed files with 41 additions and 6 deletions
|
@ -1233,6 +1233,14 @@ templates used by the :class:`ModelAdmin` views:
|
|||
to return the same kind of sequence type as for the
|
||||
:attr:`~ModelAdmin.list_filter` attribute.
|
||||
|
||||
.. method:: ModelAdmin.get_search_fields(self, request)
|
||||
|
||||
.. versionadded:: 1.7
|
||||
|
||||
The ``get_search_fields`` method is given the ``HttpRequest`` and is expected
|
||||
to return the same kind of sequence type as for the
|
||||
:attr:`~ModelAdmin.search_fields` attribute.
|
||||
|
||||
.. method:: ModelAdmin.get_inline_instances(self, request, obj=None)
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
|
|
@ -110,6 +110,9 @@ Minor features
|
|||
or ``None`` for the key and the custom label as the value. The default blank
|
||||
option ``"----------"`` will be omitted in this case.
|
||||
|
||||
* The admin's search fields can now be customized per-request thanks to the new
|
||||
:meth:`django.contrib.admin.ModelAdmin.get_search_fields` method.
|
||||
|
||||
Backwards incompatible changes in 1.7
|
||||
=====================================
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue