Skip to content

Render Config fails with DataFile templates using dynamic include statements #18066

@ed-ud

Description

@ed-ud

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.4

Python Version

3.12

Steps to Reproduce

  1. Create a Data Source with several Jinja2 template files:

start.j2:
{%- set PATH = 'my/prefix/' %}
{%- include PATH + 'test.j2' %}

my/prefix/test.j2:
SOME RENDERED TEXT

  1. Create Config Template using the Data Source and the Data File start.j2
  2. Attach Config Template to a Device
  3. Select the Render Config tab on the Device

Expected Behavior

Should not fail to render.

Observed Behavior

Fails to render with TemplateNotFound 'my/prefix/test.j2' exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: duplicateThis issue has already been raisedtype: bugA confirmed report of unexpected behavior in the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions