[PR #4136] [MERGED] Closes #3912: Remove chained form fields #12769

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4136
Author: @jeremystretch
Created: 2/11/2020
Status: Merged
Merged: 2/11/2020
Merged by: @jeremystretch

Base: developHead: 3912-remove-chained-fields


📝 Commits (5)

  • 5ea30c8 Replace ChainedModelChoiceField with DynamicModelChoiceField
  • da68968 Replace FilterChoiceField with DynamicModelMultipleChoiceField
  • 221805a Use TreeNode choice fields for region assignment
  • fb56d5b Account for initial data when binding a DynamicModelChoiceField
  • 7177fcf Use DynamicModelChoiceField for all fields using APISelect

📊 Changes

8 files changed (+588 additions, -556 deletions)

View changed files

📝 netbox/circuits/forms.py (+27 -16)
📝 netbox/dcim/forms.py (+249 -237)
📝 netbox/extras/forms.py (+79 -41)
📝 netbox/ipam/forms.py (+97 -82)
📝 netbox/secrets/forms.py (+11 -9)
📝 netbox/tenancy/forms.py (+22 -20)
📝 netbox/utilities/forms.py (+21 -80)
📝 netbox/virtualization/forms.py (+82 -71)

📄 Description

Fixes: #3912

  • Remove ChainedFieldsMixin
  • Convert all ChainedModelChoiceFields to DynamicModelChoiceField
  • Replace instances of FilterChoiceField with DynamicModelChoiceField(required=False)

🔄 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/4136 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/11/2020 **Status:** ✅ Merged **Merged:** 2/11/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3912-remove-chained-fields` --- ### 📝 Commits (5) - [`5ea30c8`](https://github.com/netbox-community/netbox/commit/5ea30c862846e82b5778c99419b4be340e929657) Replace ChainedModelChoiceField with DynamicModelChoiceField - [`da68968`](https://github.com/netbox-community/netbox/commit/da68968d7561f7d6a51f9db42a53c8551a9d6bb3) Replace FilterChoiceField with DynamicModelMultipleChoiceField - [`221805a`](https://github.com/netbox-community/netbox/commit/221805a63efa965b62f3b646d707ffbaa2c639ff) Use TreeNode choice fields for region assignment - [`fb56d5b`](https://github.com/netbox-community/netbox/commit/fb56d5bc660fef2555e5d7ea69b8306c7a6f2de8) Account for initial data when binding a DynamicModelChoiceField - [`7177fcf`](https://github.com/netbox-community/netbox/commit/7177fcfa61456f58efe511b67ad066526da7f791) Use DynamicModelChoiceField for all fields using APISelect ### 📊 Changes **8 files changed** (+588 additions, -556 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/forms.py` (+27 -16) 📝 `netbox/dcim/forms.py` (+249 -237) 📝 `netbox/extras/forms.py` (+79 -41) 📝 `netbox/ipam/forms.py` (+97 -82) 📝 `netbox/secrets/forms.py` (+11 -9) 📝 `netbox/tenancy/forms.py` (+22 -20) 📝 `netbox/utilities/forms.py` (+21 -80) 📝 `netbox/virtualization/forms.py` (+82 -71) </details> ### 📄 Description ### Fixes: #3912 - Remove ChainedFieldsMixin - Convert all ChainedModelChoiceFields to DynamicModelChoiceField - Replace instances of FilterChoiceField with DynamicModelChoiceField(required=False) --- <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:23:30 +01:00
adam closed this issue 2025-12-29 22:23:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12769