contenttypes.ContentType
ContentType(id, app_label, model)
Fields
| Field | Type | Description |
|---|---|---|
| app_label | String (up to 100) | app label |
| app_labeled_name | ||
| id | Integer | ID |
| logentry_set.all | List | all related admin.LogEntry objects |
| logentry_set.count | Integer | number of related admin.LogEntry objects |
| model | String (up to 100) | python model class name |
| model_class | Return the model class for this type of content. |
|
| name | ||
| natural_key | ||
| permission_set.all | List | all related auth.Permission objects |
| permission_set.count | Integer | number of related auth.Permission objects |
Methods with arguments
| Method | Arguments | Description |
|---|---|---|
| get_all_objects_for_this_type | **kwargs | Return all objects of this type for the keyword arguments given. |
| get_object_for_this_type | **kwargs | Return an object of this type for the keyword arguments given. Basically, this is a proxy around this object_type's get_object() model method. The ObjectNotExist exception, if thrown, will not be caught, so code that calls this method should catch it. |