How do I render jinja2 output to a file in Python instead of a Browser

Viewed 94231

I have a jinja2 template (.html file) that I want to render (replace the tokens with values from my py file). Instead of sending the rendered result to a browser, however, I want to write it to a new .html file. I would imagine the solution would also be similar for a django template.

How can I do this?

3 Answers
Related