mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 02:06:42 -06:00
feat(tags): Add object types field to Tag import form
Introduces the `object_types` field in the Tag bulk import form, allowing assignment of one or more object types to Tags.
This commit is contained in:
parent
ecb8656723
commit
0c15d7a1a9
@ -238,10 +238,18 @@ class TagImportForm(CSVModelForm):
|
|||||||
label=_('Weight'),
|
label=_('Weight'),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
object_types = CSVMultipleContentTypeField(
|
||||||
|
label=_('Object types'),
|
||||||
|
queryset=ObjectType.objects.with_feature('tags'),
|
||||||
|
help_text=_("One or more assigned object types"),
|
||||||
|
required=False,
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Tag
|
model = Tag
|
||||||
fields = ('name', 'slug', 'color', 'weight', 'description')
|
fields = (
|
||||||
|
'name', 'slug', 'color', 'weight', 'description', 'object_types',
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class JournalEntryImportForm(NetBoxModelImportForm):
|
class JournalEntryImportForm(NetBoxModelImportForm):
|
||||||
|
Loading…
Reference in New Issue
Block a user