Opened 9 years ago

Closed 6 years ago

Last modified 5 years ago

#7284 closed (fixed)

foreign_key__related_fieldname documentation could be clearer

Reported by: rbell01824@… Owned by: Simon Meers
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 Morales)

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 Simon Meers 6 years ago.
7284.2.diff (589 bytes) - added by Simon Meers 6 years ago.
Field name without underscore might be clearer.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by Ramiro Morales

Description: modified (diff)

comment:2 Changed 8 years ago by Julian Bez

Triage Stage: UnreviewedAccepted

Changed 6 years ago by Simon Meers

Attachment: 7284.diff added

comment:3 Changed 6 years ago by Simon Meers

Has patch: set

Clarifying example added as requested.

Changed 6 years ago by Simon Meers

Attachment: 7284.2.diff added

Field name without underscore might be clearer.

comment:4 Changed 6 years ago by Simon Meers

milestone: 1.3
Owner: changed from nobody to Simon Meers
Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:5 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(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 6 years ago by Russell Keith-Magee

(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 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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