[PR #8504] [MERGED] Closes #8488: Support form components for plugins #13362

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/8504
Author: @jeremystretch
Created: 1/31/2022
Status: Merged
Merged: 1/31/2022
Merged by: @jeremystretch

Base: featureHead: 8488-plugins-forms


📝 Commits (8)

  • 0fe7237 Remove unused form attribute from BulkDeleteView
  • f477673 Establish 4 core forms in netbox.forms.base
  • e4eee1c Clean up nullable fields declaration for bulk edit forms
  • cf3ca5a Refactor & document supported form fields
  • ccb3a75 Move fieldsets out of Meta for model forms
  • 353e132 Replace filter_groups with fieldsets on filter forms
  • d1672f8 Move nullable_fields out of Meta for bulk edit forms
  • bfb1a82 Update docstrings for base form classes

📊 Changes

47 files changed (+1625 additions, -1567 deletions)

View changed files

docs/plugins/development/forms.md (+78 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/circuits/forms/bulk_edit.py (+15 -19)
📝 netbox/circuits/forms/bulk_import.py (+5 -5)
📝 netbox/circuits/forms/filtersets.py (+20 -20)
📝 netbox/circuits/forms/models.py (+19 -16)
📝 netbox/dcim/forms/bulk_edit.py (+79 -132)
📝 netbox/dcim/forms/bulk_import.py (+28 -28)
📝 netbox/dcim/forms/connections.py (+4 -4)
📝 netbox/dcim/forms/filtersets.py (+147 -143)
📝 netbox/dcim/forms/models.py (+91 -83)
📝 netbox/dcim/forms/object_create.py (+2 -2)
📝 netbox/extras/forms/bulk_edit.py (+5 -18)
📝 netbox/extras/forms/customfields.py (+0 -81)
📝 netbox/extras/forms/filtersets.py (+34 -35)
📝 netbox/extras/forms/models.py (+33 -45)
📝 netbox/ipam/forms/bulk_edit.py (+35 -64)
📝 netbox/ipam/forms/bulk_import.py (+15 -15)
📝 netbox/ipam/forms/filtersets.py (+71 -71)
📝 netbox/ipam/forms/models.py (+60 -52)

...and 27 more files

📄 Description

Closes: #8488

Cleans up existing forms and introduces four base form classes for use by plugins:

  • NetBoxModelForm
  • NetBoxModelCSVForm
  • NetBoxModelBulkEditForm
  • NetBoxModelFilterSetForm

🔄 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/8504 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/31/2022 **Status:** ✅ Merged **Merged:** 1/31/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `8488-plugins-forms` --- ### 📝 Commits (8) - [`0fe7237`](https://github.com/netbox-community/netbox/commit/0fe72376b158ebcfca02f29a92c2c0ce29be91c5) Remove unused form attribute from BulkDeleteView - [`f477673`](https://github.com/netbox-community/netbox/commit/f4776731ecc3d815c8002e9bbc50b81299e34403) Establish 4 core forms in netbox.forms.base - [`e4eee1c`](https://github.com/netbox-community/netbox/commit/e4eee1cdfc74519e1494102506655063ac8b0264) Clean up nullable fields declaration for bulk edit forms - [`cf3ca5a`](https://github.com/netbox-community/netbox/commit/cf3ca5a661cc015baf4ef462be07e91c09db0ede) Refactor & document supported form fields - [`ccb3a75`](https://github.com/netbox-community/netbox/commit/ccb3a7528114b9c42f59e579687585218522828e) Move fieldsets out of Meta for model forms - [`353e132`](https://github.com/netbox-community/netbox/commit/353e132cf95b82b9d61cbadc7c34e054c3030b88) Replace filter_groups with fieldsets on filter forms - [`d1672f8`](https://github.com/netbox-community/netbox/commit/d1672f8818de1f712854dd22011c8a7b99e9a193) Move nullable_fields out of Meta for bulk edit forms - [`bfb1a82`](https://github.com/netbox-community/netbox/commit/bfb1a82754cc66b223d4d0905451680eb7a01849) Update docstrings for base form classes ### 📊 Changes **47 files changed** (+1625 additions, -1567 deletions) <details> <summary>View changed files</summary> ➕ `docs/plugins/development/forms.md` (+78 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/circuits/forms/bulk_edit.py` (+15 -19) 📝 `netbox/circuits/forms/bulk_import.py` (+5 -5) 📝 `netbox/circuits/forms/filtersets.py` (+20 -20) 📝 `netbox/circuits/forms/models.py` (+19 -16) 📝 `netbox/dcim/forms/bulk_edit.py` (+79 -132) 📝 `netbox/dcim/forms/bulk_import.py` (+28 -28) 📝 `netbox/dcim/forms/connections.py` (+4 -4) 📝 `netbox/dcim/forms/filtersets.py` (+147 -143) 📝 `netbox/dcim/forms/models.py` (+91 -83) 📝 `netbox/dcim/forms/object_create.py` (+2 -2) 📝 `netbox/extras/forms/bulk_edit.py` (+5 -18) 📝 `netbox/extras/forms/customfields.py` (+0 -81) 📝 `netbox/extras/forms/filtersets.py` (+34 -35) 📝 `netbox/extras/forms/models.py` (+33 -45) 📝 `netbox/ipam/forms/bulk_edit.py` (+35 -64) 📝 `netbox/ipam/forms/bulk_import.py` (+15 -15) 📝 `netbox/ipam/forms/filtersets.py` (+71 -71) 📝 `netbox/ipam/forms/models.py` (+60 -52) _...and 27 more files_ </details> ### 📄 Description ### Closes: #8488 Cleans up existing forms and introduces four base form classes for use by plugins: * NetBoxModelForm * NetBoxModelCSVForm * NetBoxModelBulkEditForm * NetBoxModelFilterSetForm --- <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:26:59 +01:00
adam closed this issue 2025-12-29 22:26:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13362