contenttypes.models.ContentTypeManager.get_for_model()

get_for_model(model, for_concrete_model=True)

Takes either a model class or an instance of a model, and returns the ContentType instance representing that model. for_concrete_model=False allows fetching the ContentType of a proxy model.

doc_Django
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.