mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Show parent device/VM when creating new components
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django import forms
|
||||
|
||||
from utilities.forms import BootstrapMixin, ExpandableNameField
|
||||
from utilities.forms import BootstrapMixin, DynamicModelChoiceField, ExpandableNameField
|
||||
from .models import VirtualMachine
|
||||
|
||||
__all__ = (
|
||||
'VMInterfaceCreateForm',
|
||||
@@ -8,6 +9,9 @@ __all__ = (
|
||||
|
||||
|
||||
class VMInterfaceCreateForm(BootstrapMixin, forms.Form):
|
||||
virtual_machine = DynamicModelChoiceField(
|
||||
queryset=VirtualMachine.objects.all()
|
||||
)
|
||||
name_pattern = ExpandableNameField(
|
||||
label='Name'
|
||||
)
|
||||
|
Reference in New Issue
Block a user