Author: adrian
Date: 2007-01-22 20:01:20 -0600 (Mon, 22 Jan 2007)
New Revision: 4392

Modified:
   django/trunk/docs/model-api.txt
Log:
Fixed #3346 -- Documented that search_fields Admin option can use related 
models. Thanks for the patch, Robert Myers and Gary Wilson

Modified: django/trunk/docs/model-api.txt
===================================================================
--- django/trunk/docs/model-api.txt     2007-01-22 06:48:10 UTC (rev 4391)
+++ django/trunk/docs/model-api.txt     2007-01-23 02:01:20 UTC (rev 4392)
@@ -1408,8 +1408,11 @@
 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
 insensitive, where each word must be in at least one of ``search_fields``. For


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to