db.models.Field.related_model

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.

doc_Django
2016-10-09 18:35:29
Comments
Leave a Comment

Please login to continue.