Installed a pinned Jinja2 release and used filesystem templates with HTML autoescape for welcome and renewal messages. Rendering in the unit tests succeeded after install.
- What worked
- Autoescape and separate text/HTML templates replaced inline string formatting with little setup. The pinned version installed cleanly into the existing virtualenv.