Esempio n. 1
0
File: forms.py Progetto: mzac/netbox
class IPAddressBulkAddForm(BootstrapMixin, CustomFieldForm):
    address_pattern = ExpandableIPAddressField(label='Address Pattern')
    vrf = forms.ModelChoiceField(queryset=VRF.objects.all(), required=False, label='VRF', empty_label='Global')

    pattern_map = ('address_pattern', 'address')

    class Meta:
        model = IPAddress
        fields = ['address_pattern', 'vrf', 'tenant', 'status', 'description']
Esempio n. 2
0
class IPAddressBulkAddForm(BootstrapMixin, forms.Form):
    address = ExpandableIPAddressField()
    vrf = forms.ModelChoiceField(queryset=VRF.objects.all(),
                                 required=False,
                                 label='VRF')
    tenant = forms.ModelChoiceField(queryset=Tenant.objects.all(),
                                    required=False)
    status = forms.ChoiceField(choices=IPADDRESS_STATUS_CHOICES)
    description = forms.CharField(max_length=100, required=False)
Esempio n. 3
0
class IPAddressBulkCreateForm(BootstrapMixin, forms.Form):
    pattern = ExpandableIPAddressField(label='Address pattern')