Django

Code

Changeset 7976

Show
Ignore:
Timestamp:
07/18/08 21:46:12 (4 months ago)
Author:
russellm
Message:

Fixed #7785 -- Added a note in the contenttypes documentation that GenericRelations? must share a common field type for primary keys. Thanks to Rudolph for the suggestion and initial draft.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/contenttypes.txt

    r7294 r7976  
    205205       models you'll be relating to. (For most models, this means an 
    206206       ``IntegerField`` or ``PositiveIntegerField``.) 
     207 
     208           This field must be of the same type as the primary key of the models 
     209           that will be involved in the generic relation. For example, if you use 
     210           ``IntegerField``, you won't be able to form a generic relation with a 
     211           model that uses a ``CharField`` as a primary key. 
    207212 
    208213    3. Give your model a ``GenericForeignKey``, and pass it the names of