[PR #4524] [MERGED] Fixes #4139: Extend forms for bulk device component creation #12865

Closed
opened 2025-12-29 22:24:03 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4524
Author: @jeremystretch
Created: 4/22/2020
Status: Merged
Merged: 4/22/2020
Merged by: @jeremystretch

Base: developHead: 4139-component-bulk-create


📝 Commits (5)

  • 97b8e73 Introduce model-specific bulk create forms for device components
  • 62cdf0d Add bulk creation view for rear ports
  • e975f1b Update device component bulk edit forms to use form_from_model()
  • 6a61f09 Update InterfaceBulkCreateForm for VMs
  • 7b50f2b Fix tag assignment when bulk creating components

📊 Changes

8 files changed (+479 additions, -473 deletions)

View changed files

📝 netbox/dcim/forms.py (+397 -432)
📝 netbox/dcim/urls.py (+1 -1)
📝 netbox/dcim/views.py (+30 -6)
📝 netbox/templates/dcim/device_list.html (+1 -0)
📝 netbox/utilities/forms.py (+14 -0)
📝 netbox/utilities/views.py (+24 -17)
📝 netbox/virtualization/forms.py (+11 -16)
📝 netbox/virtualization/views.py (+1 -1)

📄 Description

Fixes: #4139

  • Adds a form_from_model() utility function to generate forms from modelfields without incurring validation, etc.
  • Extend the component bulk creation forms to support all relevant model fields
  • Simplify the component bulk edit forms using form_from_model()

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4524 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 4/22/2020 **Status:** ✅ Merged **Merged:** 4/22/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4139-component-bulk-create` --- ### 📝 Commits (5) - [`97b8e73`](https://github.com/netbox-community/netbox/commit/97b8e73716c8d6a76f9e11eb370d6273050a6889) Introduce model-specific bulk create forms for device components - [`62cdf0d`](https://github.com/netbox-community/netbox/commit/62cdf0d92864f6b7a8f570236008f495b6323c1e) Add bulk creation view for rear ports - [`e975f1b`](https://github.com/netbox-community/netbox/commit/e975f1b216b3307029572144226b6cd003869905) Update device component bulk edit forms to use form_from_model() - [`6a61f09`](https://github.com/netbox-community/netbox/commit/6a61f0911dfc8183444b428fc971acec4766eed6) Update InterfaceBulkCreateForm for VMs - [`7b50f2b`](https://github.com/netbox-community/netbox/commit/7b50f2b0eb7ac0071d21c7ab47ec37e23d353161) Fix tag assignment when bulk creating components ### 📊 Changes **8 files changed** (+479 additions, -473 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms.py` (+397 -432) 📝 `netbox/dcim/urls.py` (+1 -1) 📝 `netbox/dcim/views.py` (+30 -6) 📝 `netbox/templates/dcim/device_list.html` (+1 -0) 📝 `netbox/utilities/forms.py` (+14 -0) 📝 `netbox/utilities/views.py` (+24 -17) 📝 `netbox/virtualization/forms.py` (+11 -16) 📝 `netbox/virtualization/views.py` (+1 -1) </details> ### 📄 Description ### Fixes: #4139 - Adds a `form_from_model()` utility function to generate forms from modelfields without incurring validation, etc. - Extend the component bulk creation forms to support all relevant model fields - Simplify the component bulk edit forms using `form_from_model()` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:03 +01:00
adam closed this issue 2025-12-29 22:24:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12865