mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Add site CSVModelChoiceField
This commit is contained in:
parent
29c25e39fc
commit
3a2aa84a5d
@ -177,6 +177,13 @@ class PrefixImportForm(ScopedImportForm, NetBoxModelImportForm):
|
|||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
help_text=_("VLAN's group (if any)")
|
help_text=_("VLAN's group (if any)")
|
||||||
)
|
)
|
||||||
|
site = CSVModelChoiceField(
|
||||||
|
label=_('VLAN Site'),
|
||||||
|
queryset=Site.objects.all(),
|
||||||
|
required=False,
|
||||||
|
to_field_name='name',
|
||||||
|
help_text=_("VLAN's site (if any)")
|
||||||
|
)
|
||||||
vlan = CSVModelChoiceField(
|
vlan = CSVModelChoiceField(
|
||||||
label=_('VLAN'),
|
label=_('VLAN'),
|
||||||
queryset=VLAN.objects.all(),
|
queryset=VLAN.objects.all(),
|
||||||
@ -200,8 +207,8 @@ class PrefixImportForm(ScopedImportForm, NetBoxModelImportForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Prefix
|
model = Prefix
|
||||||
fields = (
|
fields = (
|
||||||
'prefix', 'vrf', 'tenant', 'vlan_group', 'vlan', 'status', 'role', 'scope_type', 'scope_id', 'is_pool',
|
'prefix', 'vrf', 'tenant', 'vlan_group', 'site', 'vlan', 'status', 'role', 'scope_type', 'scope_id',
|
||||||
'mark_utilized', 'description', 'comments', 'tags',
|
'is_pool', 'mark_utilized', 'description', 'comments', 'tags',
|
||||||
)
|
)
|
||||||
labels = {
|
labels = {
|
||||||
'scope_id': _('Scope ID'),
|
'scope_id': _('Scope ID'),
|
||||||
|
Loading…
Reference in New Issue
Block a user