Code

Ticket #7284: 7284.2.diff

File 7284.2.diff, 589 bytes (added by DrMeers, 4 years ago)

Field name without underscore might be clearer.

Line 
1Index: docs/ref/contrib/admin/index.txt
2===================================================================
3--- docs/ref/contrib/admin/index.txt    (revision 13402)
4+++ docs/ref/contrib/admin/index.txt    (working copy)
5@@ -600,6 +600,10 @@
6 
7     search_fields = ['foreign_key__related_fieldname']
8 
9+For example::
10+
11+    search_fields = ['user__email']
12+
13 When somebody does a search in the admin search box, Django splits the search
14 query into words and returns all objects that contain each of the words, case
15 insensitive, where each word must be in at least one of ``search_fields``. For