Fixed #10367 -- Corrected an example in the documentation for GenericRelation. Thanks to George Song for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-05-02 14:51:54 +00:00
parent 87d3ff731b
commit 95bcb70b56
1 changed files with 8 additions and 8 deletions

View File

@ -313,7 +313,7 @@ referred to above used fields named ``content_type_fk`` and
``object_primary_key`` to create its generic foreign key, then a
``GenericRelation`` back to it would need to be defined like so::
tags = generic.GenericRelation('content_type_fk', 'object_primary_key')
tags = generic.GenericRelation(TaggedItem, content_type_field='content_type_fk', object_id_field='object_primary_key')
Of course, if you don't add the reverse relationship, you can do the
same types of lookups manually::