[PR #4375] [MERGED] Closes #4374: Automatically derive API endpoint for dynamic choice fields #12829

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4375
Author: @jeremystretch
Created: 3/16/2020
Status: Merged
Merged: 3/16/2020
Merged by: @jeremystretch

Base: developHead: 4374-dynamic-fields-api-url


📝 Commits (4)

  • 400f6fc Dynamically resolve the API URL for dynamic choice fields
  • 0068108 Remove APISelect widget/api_url argument from dynamic fields
  • 73881ad Change CircuitTerminationForm.site to a DynamicModelChoiceField
  • 450615e Change IPAddressForm.nat_vrf to DynamicModelChoiceField

📊 Changes

8 files changed (+127 additions, -559 deletions)

View changed files

📝 netbox/circuits/forms.py (+8 -29)
📝 netbox/dcim/forms.py (+50 -272)
📝 netbox/extras/forms.py (+9 -44)
📝 netbox/ipam/forms.py (+22 -106)
📝 netbox/secrets/forms.py (+3 -13)
📝 netbox/tenancy/forms.py (+3 -16)
📝 netbox/utilities/forms.py (+18 -3)
📝 netbox/virtualization/forms.py (+14 -76)

📄 Description

Fixes: #4374

  • Extend DynamicModelChoiceMixin to automatically set the data-url attribute on its APISelect widget
  • Remove the api_url attribute (or the entire widget) from all dynamic choice field instances

🔄 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/4375 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/16/2020 **Status:** ✅ Merged **Merged:** 3/16/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4374-dynamic-fields-api-url` --- ### 📝 Commits (4) - [`400f6fc`](https://github.com/netbox-community/netbox/commit/400f6fc5fb45b907a5066a4f6b540cfeae41f5e3) Dynamically resolve the API URL for dynamic choice fields - [`0068108`](https://github.com/netbox-community/netbox/commit/0068108c57857f4314fb8fd8ede18b88edcb5481) Remove APISelect widget/api_url argument from dynamic fields - [`73881ad`](https://github.com/netbox-community/netbox/commit/73881ad1e043850d5462b5e1ca81dce410b4c10c) Change CircuitTerminationForm.site to a DynamicModelChoiceField - [`450615e`](https://github.com/netbox-community/netbox/commit/450615e0bb0cbec80213fa0e7011be316f39f03a) Change IPAddressForm.nat_vrf to DynamicModelChoiceField ### 📊 Changes **8 files changed** (+127 additions, -559 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/forms.py` (+8 -29) 📝 `netbox/dcim/forms.py` (+50 -272) 📝 `netbox/extras/forms.py` (+9 -44) 📝 `netbox/ipam/forms.py` (+22 -106) 📝 `netbox/secrets/forms.py` (+3 -13) 📝 `netbox/tenancy/forms.py` (+3 -16) 📝 `netbox/utilities/forms.py` (+18 -3) 📝 `netbox/virtualization/forms.py` (+14 -76) </details> ### 📄 Description ### Fixes: #4374 - Extend DynamicModelChoiceMixin to automatically set the `data-url` attribute on its APISelect widget - Remove the `api_url` attribute (or the entire widget) from all dynamic choice field instances --- <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:51 +01:00
adam closed this issue 2025-12-29 22:23:51 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12829