Opened 17 years ago

Closed 14 years ago

Last modified 13 years ago

#7284 closed (fixed)

foreign_key__related_fieldname documentation could be clearer

Reported by: rbell01824@… Owned by: Simon Meers
Component: Documentation Version: dev
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: no UI/UX: no

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

Download all attachments as: .zip

Change History (9)

comment:1 by Ramiro Morales, 16 years ago

Description: modified (diff)

comment:2 by Julian Bez, 16 years ago

Triage Stage: UnreviewedAccepted

by Simon Meers, 14 years ago

Attachment: 7284.diff added

comment:3 by Simon Meers, 14 years ago

Has patch: set

Clarifying example added as requested.

by Simon Meers, 14 years ago

Attachment: 7284.2.diff added

Field name without underscore might be clearer.

comment:4 by Simon Meers, 14 years ago

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

comment:5 by Russell Keith-Magee, 14 years ago

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 by Russell Keith-Magee, 14 years ago

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

milestone: 1.3

Milestone 1.3 deleted

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