Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#10367 closed (fixed)

Improve docs for `GenericRelation` in `contenttypes`.

Reported by: Tai Lee Owned by: Kevin Kubasik
Component: Documentation Version: dev
Severity: Keywords: GenericRelation GenericForeignKey comments kkmegapatch
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

At least one contrib app uses a non-default value for fk_field in a GenericForeignKey (comments app uses "object_pk", which means users need to specify their reverse generic relation as GenericRelation(Comment, object_id_field="object_pk"), but keyword arguments for GenericRelation are not documented.

Attachments (2)

10367-genericrelation-r9907.diff (970 bytes ) - added by Tai Lee 15 years ago.
Updated to include an example.
10367-genericrelation-r10591.diff (684 bytes ) - added by George Song 15 years ago.
Fixed incorrect GenericRelation example.

Download all attachments as: .zip

Change History (13)

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Tai Lee, 15 years ago

Has patch: set

by Tai Lee, 15 years ago

Updated to include an example.

comment:3 by Tai Lee, 15 years ago

milestone: 1.1 beta
Version: 1.0-beta-1SVN

Incorrectly set version as 1.0 beta, instead of milestone 1.1 beta.

comment:4 by Alex Gaynor, 15 years ago

milestone: 1.1 beta1.1

milestone is 1.1, beta is for features only

comment:5 by Kevin Kubasik, 15 years ago

Keywords: kkmegapatch added
Owner: changed from nobody to Kevin Kubasik

comment:6 by James Bennett, 15 years ago

Resolution: fixed
Status: newclosed

(In [10273]) Fixed #10367: Added note to generic-relation docs explaining when it's necessary to pass in field names to create a reverse relation.

comment:7 by James Bennett, 15 years ago

(In [10274]) [1.0.X] Fixed #10367: Added note to generic-relation docs explaining when it's necessary to pass in field names to create a reverse relation. Backport of [10273] from trunk.

by George Song, 15 years ago

Fixed incorrect GenericRelation example.

comment:8 by George Song, 15 years ago

Resolution: fixed
Status: closedreopened

I think the fix in [10273] actually contained incorrect info about how to use GenericRelation in case of non-default field names.

comment:9 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: reopenedclosed

(In [10659]) Fixed #10367 -- Corrected an example in the documentation for GenericRelation. Thanks to George Song for the patch.

comment:10 by Russell Keith-Magee, 15 years ago

(In [10661]) [1.0.x] Fixed #10367 -- Corrected an example in the documentation for GenericRelation. Thanks to George Song for the patch.

Merge of r10659 from trunk.

comment:11 by Jacob, 12 years ago

milestone: 1.1

Milestone 1.1 deleted

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