summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-01-23 02:01:20 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-01-23 02:01:20 +0000
commit9afddbe42247b14f98ab4eb8697c3df0ad984ed2 (patch)
tree75752f588c32e7b589e48760fa6447b580445614
parent2e042f33e319bb5c4ea48b24f2520df29d30a886 (diff)
Fixed #3346 -- Documented that search_fields Admin option can use related models. Thanks for the patch, Robert Myers and Gary Wilson
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/model-api.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt
index 603c131662..33742220a3 100644
--- a/docs/model-api.txt
+++ b/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``.
+``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