简体   繁体   English

在烧瓶中格式化HTML代码?

[英]Format html code in flask?

Is it possible to format html code before I render it with flask? 在用flask渲染之前,是否可以格式化html代码? In my current project, I use many jinja templates and everything is working, but the source code in the browser, doesn't look so good. 在我当前的项目中,我使用了许多Jinja模板,并且一切正常,但是浏览器中的源代码看起来不太好。 It's not so important but it would look much nicer with a prettified html code. 它不是很重要,但是使用经过修饰的html代码看起来会更好。 Thanks 谢谢

Intellij Idea understand .html files with jinja2 templates. Intellij Idea通过jinja2模板了解.html文件。 Just use CTRL + ALT + L for make formatting of whole file. 只需使用CTRL + ALT + L即可对整个文件进行格式化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM