| 306 | Note that if the model with a :class:`~django.contrib.contenttypes.generic.GenericForeignKey` |
| 307 | that you're referring to uses a non-default value for ``ct_field`` or ``fk_field`` |
| 308 | (e.g. the :mod:`django.contrib.comments` app uses ``ct_field="object_pk"``), |
| 309 | you'll need to pass ``content_type_field`` and ``object_id_field`` to |
| 310 | :class:`~django.contrib.contenttypes.generic.GenericRelation`. |
| 311 | |
| 312 | comments = generic.GenericRelation(Comment, content_type_field="content_type", object_id_field="object_pk") |
| 313 | |