Fixed #27511 -- Corrected Field.related_model docs about GenericRelation.

This commit is contained in:
Tim Graham 2016-11-21 12:30:54 -05:00
parent 19e2114634
commit 55adfc0760
1 changed files with 2 additions and 3 deletions

View File

@ -2007,6 +2007,5 @@ have boolean values (rather than ``None``) if the field is a relation type
.. attribute:: Field.related_model
Points to the model the field relates to. For example, ``Author`` in
``ForeignKey(Author, on_delete=models.CASCADE)``. If a field has a generic
relation (such as a ``GenericForeignKey`` or a ``GenericRelation``) then
``related_model`` will be ``None``.
``ForeignKey(Author, on_delete=models.CASCADE)``. The ``related_model`` for
a ``GenericForeignKey`` is always ``None``.