Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7284 -- Provided an example for the use of the search_fields c…

…lause on ModelAdmin. Thanks to for the suggestion, and Simon Meers for the initial patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit bafe9fdef2060f315a6b37f8eeffc1af1492c565 1 parent 244e7b9
Russell Keith-Magee authored August 07, 2010

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  docs/ref/contrib/admin/index.txt
5  docs/ref/contrib/admin/index.txt
@@ -600,6 +600,11 @@ the lookup API "follow" notation::
600 600
601 601
     search_fields = ['foreign_key__related_fieldname']
602 602
+For example, if you have a blog entry with an author, the following definition
+would enable search blog entries by the email address of the author::
+    search_fields = ['user__email']
603 608
 When somebody does a search in the admin search box, Django splits the search
604 609
 query into words and returns all objects that contain each of the words, case
605 610
 insensitive, where each word must be in at least one of ``search_fields``. For

0 notes on commit bafe9fd

Please sign in to comment.
Something went wrong with that request. Please try again.