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 you're referring to is a |
| 328 | :class:`~django.contrib.contenttypes.generic.GenericForeignKey` that |
| 329 | uses a non-default value for ``ct_field`` or ``fk_field`` (e.g. the |
| 330 | :mod:`django.contrib.comments` app uses ``ct_field="object_pk"``), |
| 331 | you'll need to set ``content_type_field`` and ``object_id_field`` of |
| 332 | the :class:`~django.contrib.contenttypes.generic.GenericRelation` to |
| 333 | match the ``ct_field`` and ``fk_field``, respectively, of the |
| 334 | referred-to model:: |