3

Is it possible to format html code before I render it with flask? 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. It's not so important but it would look much nicer with a prettified html code. Thanks

Keanu Hie
  • 297
  • 2
  • 8
  • 12
  • You mean styling the html page ? – Raja Simon Nov 20 '17 at 10:34
  • I don't mean css. I mean the real source code of the site. When you right-click on any web page, you can select "View Source Code" or something like this. In flask this code looks not so good, so I want to format the code before I render it with flask – Keanu Hie Nov 20 '17 at 10:44
  • I thought no one cares about view source code. As long as page serves it purpose better. – Raja Simon Nov 20 '17 at 10:45
  • I know that no one cares about that. I also wrote that it is not important, but it would look nice. – Keanu Hie Nov 20 '17 at 11:04

1 Answers1

0

Intellij Idea understand .html files with jinja2 templates. Just use CTRL + ALT + L for make formatting of whole file.

Ivan Bryzzhin
  • 2,009
  • 21
  • 27