mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove widget_attrs from BulkImportView
This commit is contained in:
@ -303,18 +303,15 @@ class BulkImportView(GetReturnURLMixin, BaseMultiObjectView):
|
|||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
model_form: The form used to create each imported object
|
model_form: The form used to create each imported object
|
||||||
widget_attrs: A dict of attributes to apply to the import widget (e.g. to require a session key)
|
|
||||||
"""
|
"""
|
||||||
template_name = 'generic/object_bulk_import.html'
|
template_name = 'generic/object_bulk_import.html'
|
||||||
model_form = None
|
model_form = None
|
||||||
widget_attrs = {}
|
|
||||||
|
|
||||||
def _import_form(self, *args, **kwargs):
|
def _import_form(self, *args, **kwargs):
|
||||||
|
|
||||||
class ImportForm(BootstrapMixin, Form):
|
class ImportForm(BootstrapMixin, Form):
|
||||||
csv = CSVDataField(
|
csv = CSVDataField(
|
||||||
from_form=self.model_form,
|
from_form=self.model_form
|
||||||
widget=Textarea(attrs=self.widget_attrs)
|
|
||||||
)
|
)
|
||||||
csv_file = CSVFileField(
|
csv_file = CSVFileField(
|
||||||
label="CSV file",
|
label="CSV file",
|
||||||
|
Reference in New Issue
Block a user