[1.2.X] Fixed #11748 -- Clarified the ways that search_field can be used. Thanks to Michael Richardson for the patch.
Backport of r13550 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7c05d23af1
commit
0fda7c8a2b
@ -594,8 +594,8 @@ This should be set to a list of field names that will be searched whenever
|
|||||||
somebody submits a search query in that text box.
|
somebody submits a search query in that text box.
|
||||||
|
|
||||||
These fields should be some kind of text field, such as ``CharField`` or
|
These fields should be some kind of text field, such as ``CharField`` or
|
||||||
``TextField``. You can also perform a related lookup on a ``ForeignKey`` with
|
``TextField``. You can also perform a related lookup on a ``ForeignKey`` or
|
||||||
the lookup API "follow" notation::
|
``ManyToManyField`` with the lookup API "follow" notation::
|
||||||
|
|
||||||
search_fields = ['foreign_key__related_fieldname']
|
search_fields = ['foreign_key__related_fieldname']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user