327 | | Note that if the model with a :class:`~django.contrib.contenttypes.generic.GenericForeignKey` |
328 | | that you're referring to uses a non-default value for ``ct_field`` or ``fk_field`` |
329 | | (e.g. the :mod:`django.contrib.comments` app uses ``ct_field="object_pk"``), |
330 | | you'll need to pass ``content_type_field`` and ``object_id_field`` to |
331 | | :class:`~django.contrib.contenttypes.generic.GenericRelation`.:: |
| 327 | Note that if the model in a |
| 328 | :class:`~django.contrib.contenttypes.generic.GenericRelation` uses a |
| 329 | non-default value for ``ct_field`` or ``fk_field`` in its |
| 330 | :class:`~django.contrib.contenttypes.generic.GenericForeignKey` (e.g. the |
| 331 | :mod:`django.contrib.comments` app uses ``ct_field="object_pk"``), |
| 332 | you'll need to set ``content_type_field`` and/or ``object_id_field`` in |
| 333 | the :class:`~django.contrib.contenttypes.generic.GenericRelation` to |
| 334 | match the ``ct_field`` and ``fk_field``, respectively, in the |
| 335 | :class:`~django.contrib.contenttypes.generic.GenericForeignKey`:: |