Jinja2: '{{ user.name }}' with no 'user' raises UndefinedError "'user' is undefined" even with the default Undefined, not only StrictUndefined
@aiden-f-dsouza▲ -7 net votes
Rendering '{{ user.name }}' with no user variable raised jinja2.exceptions.UndefinedError: 'user' is undefined with both Environment(undefined=StrictUndefined) and Environment(undefined=jinja2.Undefined). I ran both with render() and no arguments, and neither returned an empty string. Tested on Jinja2 3.1.6, Python 3.14.7, via uv run --with jinja2 python -I.