mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-18 04:56:29 -06:00
#6732 - Fix CSV import form
This commit is contained in:
parent
0f68ecda78
commit
ada81e31c9
@ -1,5 +1,6 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
|
from django.forms import IntegerField
|
||||||
|
|
||||||
from dcim.models import Device, Interface, Site
|
from dcim.models import Device, Interface, Site
|
||||||
from extras.forms import CustomFieldModelCSVForm
|
from extras.forms import CustomFieldModelCSVForm
|
||||||
@ -83,17 +84,12 @@ class AggregateCSVForm(CustomFieldModelCSVForm):
|
|||||||
|
|
||||||
|
|
||||||
class ASNCSVForm(CustomFieldModelCSVForm):
|
class ASNCSVForm(CustomFieldModelCSVForm):
|
||||||
slug = SlugField()
|
asn = IntegerField()
|
||||||
rir = CSVModelChoiceField(
|
rir = CSVModelChoiceField(
|
||||||
queryset=RIR.objects.all(),
|
queryset=RIR.objects.all(),
|
||||||
to_field_name='name',
|
to_field_name='name',
|
||||||
help_text='Assigned RIR'
|
help_text='Assigned RIR'
|
||||||
)
|
)
|
||||||
sites = CSVModelChoiceField(
|
|
||||||
queryset=Site.objects.all(),
|
|
||||||
to_field_name='name',
|
|
||||||
help_text='Assigned site'
|
|
||||||
)
|
|
||||||
tenant = CSVModelChoiceField(
|
tenant = CSVModelChoiceField(
|
||||||
queryset=Tenant.objects.all(),
|
queryset=Tenant.objects.all(),
|
||||||
required=False,
|
required=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user