Browse files

Fixed #3346 -- Documented that search_fields Admin option can use rel…

…ated models. Thanks for the patch, Robert Myers and Gary Wilson

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 2e042f3 commit 9afddbe42247b14f98ab4eb8697c3df0ad984ed2 @adrianholovaty adrianholovaty committed Jan 23, 2007
Showing with 4 additions and 1 deletion.
  1. +4 −1 docs/model-api.txt
@@ -1408,7 +1408,10 @@ This should be set to a list of field names that will be searched whenever
somebody submits a search query in that text box.
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
+the lookup API "follow" notation::
+ search_fields = ['foreign_key__related_fieldname']
When somebody does a search in the admin search box, Django splits the search
query into words and returns all objects that contain each of the words, case

0 comments on commit 9afddbe

Please sign in to comment.