1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Introduce ChangeLoggedModel as a standard model

This commit is contained in:
Jeremy Stretch
2021-03-10 13:35:13 -05:00
parent bac2387f50
commit 19b78e63ce
6 changed files with 19 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ from extras.choices import *
from extras.constants import *
from extras.querysets import ConfigContextQuerySet
from extras.utils import extras_features, FeatureQuery, image_upload
from netbox.models import BigIDModel, ChangeLoggingMixin
from netbox.models import BigIDModel, ChangeLoggedModel
from utilities.querysets import RestrictedQuerySet
from utilities.utils import deepmerge, render_jinja2
@@ -379,7 +379,7 @@ class ImageAttachment(BigIDModel):
# Config contexts
#
class ConfigContext(ChangeLoggingMixin, BigIDModel):
class ConfigContext(ChangeLoggedModel):
"""
A ConfigContext represents a set of arbitrary data available to any Device or VirtualMachine matching its assigned
qualifiers (region, site, etc.). For example, the data stored in a ConfigContext assigned to site A and tenant B

View File

@@ -2,7 +2,7 @@ from django.db import models
from django.utils.text import slugify
from taggit.models import TagBase, GenericTaggedItemBase
from netbox.models import BigIDModel, ChangeLoggingMixin
from netbox.models import BigIDModel, ChangeLoggedModel
from utilities.choices import ColorChoices
from utilities.fields import ColorField
from utilities.querysets import RestrictedQuerySet
@@ -12,7 +12,7 @@ from utilities.querysets import RestrictedQuerySet
# Tags
#
class Tag(ChangeLoggingMixin, BigIDModel, TagBase):
class Tag(ChangeLoggedModel, TagBase):
color = ColorField(
default=ColorChoices.COLOR_GREY
)