Opened 7 years ago

Closed 5 years ago

Last modified 3 years ago

#7284 closed (fixed)

foreign_key__related_fieldname documentation could be clearer

Reported by: rbell01824@… Owned by: DrMeers
Component: Documentation Version: master
Severity: Keywords: foreign_key
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by ramiro)

Documentation could be clearer in this area. The existing example

search_fields = ['foreign_key__related_fieldname']

is a bit confusing absent a real table and example of the sort

search_fields = [user__name]

or some such would be helpful as it took me, and I suspect many others, a bit of effort to discover the desired syntax.

Attachments (2)

7284.diff (594 bytes) - added by DrMeers 5 years ago.
7284.2.diff (589 bytes) - added by DrMeers 5 years ago.
Field name without underscore might be clearer.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by ramiro

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by julianb

  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by DrMeers

comment:3 Changed 5 years ago by DrMeers

  • Has patch set

Clarifying example added as requested.

Changed 5 years ago by DrMeers

Field name without underscore might be clearer.

comment:4 Changed 5 years ago by DrMeers

  • milestone set to 1.3
  • Owner changed from nobody to DrMeers
  • Status changed from new to assigned
  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [13542]) Fixed #7284 -- Provided an example for the use of the search_fields clause on ModelAdmin. Thanks to rbell01824@… for the suggestion, and Simon Meers for the initial patch.

comment:6 Changed 5 years ago by russellm

(In [13544]) [1.2.X] Fixed #7284 -- Provided an example for the use of the search_fields clause on ModelAdmin. Thanks to rbell01824@… for the suggestion, and Simon Meers for the initial patch.

Backport of r13542 from trunk.

comment:7 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top