Ticket #3346: search_fields_doc.2.diff

File search_fields_doc.2.diff, 671 bytes (added by Robert Myers <myer0052@…>, 17 years ago)

search_fields related lookup documentation attached

  • docs/model-api.txt

     
    14081408somebody submits a search query in that text box.
    14091409
    14101410These fields should be some kind of text field, such as ``CharField`` or
    1411 ``TextField``.
     1411``TextField``. You can also preform a related lookup on a ``ForeignKey`` with
     1412the lookup api "follow" notation::
     1413
     1414    search_fields = ['foreign_key__related_fieldname']
    14121415
    14131416When somebody does a search in the admin search box, Django splits the search
    14141417query into words and returns all objects that contain each of the words, case
Back to Top