-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Jinja2 template fails to render when it contains include statements #19490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Also having this issue, same symptoms. Have a github data source for config files with includes/extends. Issue started with 4.3 upgrade, same template and data source. Persists in 4.3.1 release as of this morning.
|
Did a little debugging on this, the offending change appears to be after the v4.2.8/v4.2.9 tags and before the v4.3.0-beta1 tag. List of changes: v4.3.0-beta1...v4.2.8 |
Thanks @jnovinger - please let me know if you need further info from me... |
…plates The ability to render nested templates was accidentally removed with the implementation of #17653, which normalized the behavior of various Jinja2 template rendering actions. This fix restores that behavior while retaining the normalized behavior. This fix also includes regression tests to ensure this behavior is not removed accidentally again in the future.
…fails-with-empty-include Fixes #19490: restores nesting behavior of DataSource-based ConfigTemplate
Deployment Type
Self-hosted
NetBox Version
v.4.3.1
Python Version
3.10
Steps to Reproduce
Expected Behavior
I would expect the content from 'common/base.j2' to be included in the output on the screen.
It worked fine in v4.2.8 (before upgrading to 4.3.0 and 4.3.1).
Observed Behavior
The complete exception is provided below:
<class 'TypeError'>
no loader for this environment specified
Python version: 3.10.12
NetBox version: 4.3.1
Plugins: None installed
The text was updated successfully, but these errors were encountered: