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
.
Please login to continue.