def stream_template(template_name, **context):
app.update_template_context(context)<EOL>template = app.jinja_env.get_template(template_name)<EOL>stream = template.generate(context)<EOL>return Response(stream_with_context(stream))<EOL>
Some templates can be huge, this function returns an streaming response,
sending the content in chunks and preventing from timeout.

:param template_name: template
:param **context: parameters for templates.
:yields: HTML strings