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

Refactor ComponentCreateView to use separate forms for names/labels and model creation

This commit is contained in:
jeremystretch
2021-12-27 21:04:29 -05:00
parent 99d5013de3
commit a237c01b4b
8 changed files with 49 additions and 708 deletions

View File

@@ -447,11 +447,11 @@ class VMInterfaceView(generic.ObjectView):
}
# TODO: This should not use ComponentCreateView
class VMInterfaceCreateView(generic.ComponentCreateView):
queryset = VMInterface.objects.all()
form = forms.VMInterfaceCreateForm
model_form = forms.VMInterfaceForm
patterned_fields = ('name',)
class VMInterfaceEditView(generic.ObjectEditView):