mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Introduced CBVs for IPAM Roles
This commit is contained in:
@@ -5,7 +5,7 @@ from django.db.models import Count
|
||||
|
||||
from dcim.models import Site, Device, Interface
|
||||
from utilities.forms import BootstrapMixin, ConfirmationForm, APISelect, Livesearch, CSVDataField, BulkImportForm
|
||||
from .models import VRF, RIR, Aggregate, Prefix, IPAddress, VLAN, Status, Role
|
||||
from .models import VRF, RIR, Aggregate, Role, Status, Prefix, IPAddress, VLAN
|
||||
|
||||
|
||||
#
|
||||
@@ -110,6 +110,21 @@ class AggregateFilterForm(forms.Form, BootstrapMixin):
|
||||
widget=forms.SelectMultiple(attrs={'size': 8}))
|
||||
|
||||
|
||||
#
|
||||
# Roles
|
||||
#
|
||||
|
||||
class RoleForm(forms.ModelForm, BootstrapMixin):
|
||||
|
||||
class Meta:
|
||||
model = Role
|
||||
fields = ['name', 'slug']
|
||||
|
||||
|
||||
class RoleBulkDeleteForm(ConfirmationForm):
|
||||
pk = forms.ModelMultipleChoiceField(queryset=Role.objects.all(), widget=forms.MultipleHiddenInput)
|
||||
|
||||
|
||||
#
|
||||
# Prefixes
|
||||
#
|
||||
|
Reference in New Issue
Block a user