Ticket #10367: 10367-genericrelation-r10591.diff

File 10367-genericrelation-r10591.diff, 684 bytes (added by George Song, 16 years ago)

Fixed incorrect GenericRelation example.

  • docs/ref/contrib/contenttypes.txt

     
    313313``object_primary_key`` to create its generic foreign key, then a
    314314``GenericRelation`` back to it would need to be defined like so::
    315315
    316     tags = generic.GenericRelation('content_type_fk', 'object_primary_key')
     316    tags = generic.GenericRelation(TaggedItem, content_type_field='content_type_fk', object_id_field='object_primary_key')
    317317
    318318Of course, if you don't add the reverse relationship, you can do the
    319319same types of lookups manually::
Back to Top