output_from_parsed_template = render_template('test.html', foo='Hello World!')
with open('some_new_file.html', 'wb') as f:
    f.write(output_from_parsed_template)
return output_from_parsed_template
How do I render jinja2 output to a file in Python instead of a Browser