[PR #16774] [MERGED] Closes #16726: Extend PluginTemplateExtension to allow registering multiple models #14913

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16774
Author: @jeremystretch
Created: 7/1/2024
Status: Merged
Merged: 7/1/2024
Merged by: @jeremystretch

Base: featureHead: 16726-PluginTemplateExtension-models


📝 Commits (1)

  • 1820247 Closes #16726: Extend PluginTemplateExtension to allow registering multiple models

📊 Changes

5 files changed (+23 additions, -8 deletions)

View changed files

📝 docs/plugins/development/views.md (+5 -3)
📝 netbox/netbox/plugins/registration.py (+12 -2)
📝 netbox/netbox/plugins/templates.py (+1 -0)
📝 netbox/netbox/tests/dummy_plugin/template_content.py (+1 -1)
📝 netbox/utilities/templatetags/plugins.py (+4 -2)

📄 Description

Fixes: #16726

  • Introduce models attribute on PluginTemplateExtension
  • Return both global and model-specific extensions for all views
  • Update documentation

🔄 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/16774 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/1/2024 **Status:** ✅ Merged **Merged:** 7/1/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `16726-PluginTemplateExtension-models` --- ### 📝 Commits (1) - [`1820247`](https://github.com/netbox-community/netbox/commit/1820247b518ea20c08d8835480d5eaa9bffa3b73) Closes #16726: Extend PluginTemplateExtension to allow registering multiple models ### 📊 Changes **5 files changed** (+23 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `docs/plugins/development/views.md` (+5 -3) 📝 `netbox/netbox/plugins/registration.py` (+12 -2) 📝 `netbox/netbox/plugins/templates.py` (+1 -0) 📝 `netbox/netbox/tests/dummy_plugin/template_content.py` (+1 -1) 📝 `netbox/utilities/templatetags/plugins.py` (+4 -2) </details> ### 📄 Description ### Fixes: #16726 - Introduce `models` attribute on PluginTemplateExtension - Return both global and model-specific extensions for all views - Update documentation --- <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 23:27:26 +01:00
adam closed this issue 2025-12-29 23:27:26 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14913