[PR #19962] [MERGED] Closes #18797: Support path import for certain Jinja environment parameters #15775

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19962
Author: @jeremystretch
Created: 7/28/2025
Status: Merged
Merged: 7/29/2025
Merged by: @jnovinger

Base: mainHead: 18797-jinja2-env-paths


📝 Commits (2)

  • 4bb7b62 Closes #18797: Support path import for certain Jinja environment parameters
  • 5ea5c51 Document dotted path support for Jinja env params

📊 Changes

4 files changed (+37 additions, -4 deletions)

View changed files

📝 docs/models/extras/configtemplate.md (+8 -0)
📝 docs/models/extras/exporttemplate.md (+8 -0)
📝 netbox/extras/constants.py (+6 -0)
📝 netbox/extras/models/mixins.py (+15 -4)

📄 Description

Closes: #18797

Adds support for dotted path imports for Jinja environment params undefined and finalize, for both config templates and export templates.

  • Introduce and utilize the new get_environment_params() method on RenderTemplateMixin

🔄 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/19962 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/28/2025 **Status:** ✅ Merged **Merged:** 7/29/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `18797-jinja2-env-paths` --- ### 📝 Commits (2) - [`4bb7b62`](https://github.com/netbox-community/netbox/commit/4bb7b62a30909854439dd53ef4c4200328e99d82) Closes #18797: Support path import for certain Jinja environment parameters - [`5ea5c51`](https://github.com/netbox-community/netbox/commit/5ea5c51f50990287182bc915533f1cca8674fe1b) Document dotted path support for Jinja env params ### 📊 Changes **4 files changed** (+37 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/extras/configtemplate.md` (+8 -0) 📝 `docs/models/extras/exporttemplate.md` (+8 -0) 📝 `netbox/extras/constants.py` (+6 -0) 📝 `netbox/extras/models/mixins.py` (+15 -4) </details> ### 📄 Description ### Closes: #18797 Adds support for dotted path imports for Jinja environment params `undefined` and `finalize`, for both config templates and export templates. - Introduce and utilize the new `get_environment_params()` method on RenderTemplateMixin --- <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-30 00:23:59 +01:00
adam closed this issue 2025-12-30 00:23: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#15775