Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#10367 closed (fixed)

Improve docs for `GenericRelation` in `contenttypes`.

Reported by: Tai Lee Owned by: Kevin Kubasik
Component: Documentation Version: master
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: UI/UX:

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 8 years ago.
Updated to include an example.
10367-genericrelation-r10591.diff (684 bytes) - added by George Song 7 years ago.
Fixed incorrect GenericRelation example.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Tai Lee

Has patch: set

Changed 8 years ago by Tai Lee

Updated to include an example.

comment:3 Changed 8 years ago by Tai Lee

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

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

comment:4 Changed 8 years ago by Alex Gaynor

milestone: 1.1 beta1.1

milestone is 1.1, beta is for features only

comment:5 Changed 8 years ago by Kevin Kubasik

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

comment:6 Changed 8 years ago by James Bennett

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 Changed 8 years ago by James Bennett

(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.

Changed 7 years ago by George Song

Fixed incorrect GenericRelation example.

comment:8 Changed 7 years ago by George Song

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

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

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

milestone: 1.1

Milestone 1.1 deleted

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