mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-21 02:58:43 -06:00
* Add message field to ObjectChange model * Set max length on changelog message * Enable changelog messages for single object operations * Fix tests * Add changelog message support for bulk edit & bulk delete * Cosmetic improvements to form fields * Fix bulk operation templates * Add message support for bulk import/update * Add REST API support for changelog messages (WIP) * Fix changelog_message assignment * Enable changelog message support for bulk deletions * Add documentation * Fix changelog message support for VirtualChassis * Add ChangeLoggingMixin to necesssary model forms * Introduce get_random_string() utility function for tests * Incorporate changelog messages for object view tests * Incorporate changelog messages for object bulk view tests * Add missing mixins for changelog message support * Tweak test to generate expected number of change records * Finish adding tests for changelog message functionality * Misc cleanup * Fixes #19956: Prevent duplicate deletion records from cascading deletions * Tweak bulk deletion test to work around cascading deletions issue * Correct API URL
This commit is contained in:
@@ -11,6 +11,7 @@ from extras.models import ConfigTemplate
|
||||
from ipam.choices import VLANQinQRoleChoices
|
||||
from ipam.models import ASN, IPAddress, VLAN, VLANGroup, VLANTranslationPolicy, VRF
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from netbox.forms.mixins import ChangeLoggingMixin
|
||||
from tenancy.forms import TenancyForm
|
||||
from users.models import User
|
||||
from utilities.forms import add_blank_choice, get_field_value
|
||||
@@ -973,7 +974,7 @@ class VCMemberSelectForm(forms.Form):
|
||||
# Device component templates
|
||||
#
|
||||
|
||||
class ComponentTemplateForm(forms.ModelForm):
|
||||
class ComponentTemplateForm(ChangeLoggingMixin, forms.ModelForm):
|
||||
device_type = DynamicModelChoiceField(
|
||||
label=_('Device type'),
|
||||
queryset=DeviceType.objects.all(),
|
||||
|
||||
Reference in New Issue
Block a user