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

Clean up FHRP group templates, forms

This commit is contained in:
jeremystretch
2021-11-02 13:32:41 -04:00
parent 93da5a39be
commit 2cb53a0f7e
6 changed files with 71 additions and 9 deletions

View File

@@ -867,6 +867,7 @@ class FHRPGroupView(generic.ObjectView):
class FHRPGroupEditView(generic.ObjectEditView):
queryset = FHRPGroup.objects.all()
model_form = forms.FHRPGroupForm
template_name = 'ipam/fhrpgroup_edit.html'
def get_return_url(self, request, obj=None):
return_url = super().get_return_url(request, obj)
@@ -909,6 +910,7 @@ class FHRPGroupBulkDeleteView(generic.BulkDeleteView):
class FHRPGroupAssignmentEditView(generic.ObjectEditView):
queryset = FHRPGroupAssignment.objects.all()
model_form = forms.FHRPGroupAssignmentForm
template_name = 'ipam/fhrpgroupassignment_edit.html'
def alter_obj(self, instance, request, args, kwargs):
if not instance.pk: