diff --git a/docs/contenttypes.txt b/docs/contenttypes.txt index a07ff5d70d..84e38020bc 100644 --- a/docs/contenttypes.txt +++ b/docs/contenttypes.txt @@ -227,6 +227,16 @@ creating a ``TaggedItem``:: >>> t.content_object +Due to the way ``GenericForeignKey`` is implemeneted, you cannot use such +fields directly with filters (``filter()`` and ``exclude()``, for example) via +the database API. They aren't normal field objects. These examples will *not* +work:: + + # This will fail + >>> TaggedItem.objects.filter(content_object=guido) + # This will also fail + >>> TaggedItem.objects.get(content_object=guido) + Reverse generic relations -------------------------