def render_template ( template_name , * * context ) : tmpl = jinja_env . get_template ( template_name ) context [ "url_for" ] = url_for return Response ( tmpl . render ( context ) , mimetype = "text/html" )
python flask rendor template css
Render a template into a response .
def render_template(template_name, **context):
    """Render a template into a response."""
    tmpl = jinja_env.get_template(template_name)
    context["url_for"] = url_for
    return Response(tmpl.render(context), mimetype="text/html")