BulkImport naming inconsistency #10362

Closed
opened 2025-12-29 21:30:28 +01:00 by adam · 0 comments
Owner

Originally created by @wkoot on GitHub (Oct 14, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

Either rename views.generic.BulkImportView to views.generic.ImportView, or alter the urlpatterns to name='*_bulk_import'.
For backwards compatability, the BulkView could be an alias or urlpattern name='*_import' could be supported until a next major release.

I believe that renaming the urlpattern is better, since an import action could add only a single object (i.e. with a plugin connecting to an external service).
In this case, the NetBoxModelImportForm should probably also be renamed to NetBoxModelBulkImportForm.

Justification

The current implementation is inconsistent; the other bulk urlpatterns are named _bulk_add, _bulk_edit, _bulk_rename and _bulk_delete.
See for instance netbox/dcim/urls.py and netbox/ipam/urls.py.

Originally created by @wkoot on GitHub (Oct 14, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes Either rename `views.generic.BulkImportView` to `views.generic.ImportView`, or alter the urlpatterns to `name='*_bulk_import'`. For backwards compatability, the `BulkView` could be an alias or urlpattern `name='*_import'` could be supported until a next major release. I believe that renaming the urlpattern is better, since an import action could add only a single object (i.e. with a plugin connecting to an external service). In this case, the `NetBoxModelImportForm` should probably also be renamed to `NetBoxModelBulkImportForm`. ### Justification The current implementation is inconsistent; the other bulk urlpatterns are named `_bulk_add`, `_bulk_edit`, `_bulk_rename` and `_bulk_delete`. See for instance `netbox/dcim/urls.py` and `netbox/ipam/urls.py`.
adam added the status: acceptedtype: housekeepingnetbox labels 2025-12-29 21:30:28 +01:00
adam closed this issue 2025-12-29 21:30:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10362