Author: russellm
Date: 2008-07-18 21:46:12 -0500 (Fri, 18 Jul 2008)
New Revision: 7976

Modified:
   django/trunk/docs/contenttypes.txt
Log:
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.

Modified: django/trunk/docs/contenttypes.txt
===================================================================
--- django/trunk/docs/contenttypes.txt  2008-07-19 02:38:41 UTC (rev 7975)
+++ django/trunk/docs/contenttypes.txt  2008-07-19 02:46:12 UTC (rev 7976)
@@ -205,6 +205,11 @@
        models you'll be relating to. (For most models, this means an
        ``IntegerField`` or ``PositiveIntegerField``.)
 
+          This field must be of the same type as the primary key of the models
+          that will be involved in the generic relation. For example, if you 
use
+          ``IntegerField``, you won't be able to form a generic relation with a
+          model that uses a ``CharField`` as a primary key.
+
     3. Give your model a ``GenericForeignKey``, and pass it the names of
        the two fields described above. If these fields are named
        "content_type" and "object_id", you can omit this -- those are the


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to