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

Added views for DeviceRoles

This commit is contained in:
Jeremy Stretch
2016-05-12 14:38:34 -04:00
parent 1fb2cc4b31
commit 21b3fbd50f
10 changed files with 157 additions and 20 deletions

View File

@@ -261,6 +261,21 @@ class InterfaceTemplateForm(forms.ModelForm, BootstrapMixin):
fields = ['name_pattern', 'form_factor', 'mgmt_only']
#
# Device roles
#
class DeviceRoleForm(forms.ModelForm, BootstrapMixin):
class Meta:
model = DeviceRole
fields = ['name', 'slug', 'color']
class DeviceRoleBulkDeleteForm(ConfirmationForm):
pk = forms.ModelMultipleChoiceField(queryset=DeviceRole.objects.all(), widget=forms.MultipleHiddenInput)
#
# Devices
#