Can we use a Jinja2 template instead of this?