diff --git a/docs/plugins/development/models.md b/docs/plugins/development/models.md index cb000fcb0..492b7fc97 100644 --- a/docs/plugins/development/models.md +++ b/docs/plugins/development/models.md @@ -117,6 +117,8 @@ For more information about database migrations, see the [Django documentation](h ::: netbox.models.features.CloningMixin +::: netbox.models.features.ContactsMixin + ::: netbox.models.features.CustomLinksMixin ::: netbox.models.features.CustomFieldsMixin @@ -136,8 +138,6 @@ For more information about database migrations, see the [Django documentation](h ::: netbox.models.features.TagsMixin -::: tenancy.views.ObjectContactsView - ## Choice Sets For model fields which support the selection of one or more values from a predefined list of choices, NetBox provides the `ChoiceSet` utility class. This can be used in place of a regular choices tuple to provide enhanced functionality, namely dynamic configuration and colorization. (See [Django's documentation](https://docs.djangoproject.com/en/stable/ref/models/fields/#choices) on the `choices` parameter for supported model fields.) diff --git a/netbox/netbox/models/features.py b/netbox/netbox/models/features.py index cf8f1afe8..d14fdb17f 100644 --- a/netbox/netbox/models/features.py +++ b/netbox/netbox/models/features.py @@ -353,7 +353,7 @@ class ImageAttachmentsMixin(models.Model): class ContactsMixin(models.Model): """ - Enables the assignments of Contacts (via ContactAssignment). + Enables the assignment of Contacts to a model (via ContactAssignment). """ contacts = GenericRelation( to='tenancy.ContactAssignment', @@ -368,7 +368,8 @@ class ContactsMixin(models.Model): """ Return a `QuerySet` matching all contacts assigned to this object. - :param inherited: If `True`, inherited contacts from parent objects are included. + Args: + inherited: If `True`, inherited contacts from parent objects are included. """ from tenancy.models import ContactAssignment from . import NestedGroupModel