Passing HTML to template using Flask/Jinja2

后端 未结 5 1415
灰色年华
灰色年华 2020-11-21 07:44

I\'m building an admin for Flask and SQLAlchemy, and I want to pass the HTML for the different inputs to my view using render_template. The templating framework

5条回答
  •  感情败类
    2020-11-21 08:22

    When you have a lot of variables that don't need escaping, you can use an autoescape block:

    {% autoescape off %}
    {{ something }}
    {{ something_else }}
    {{ something_important }}
    {% endautoescape %}
    

提交回复
热议问题