Flask & Jinja

So Flask like Django also uses a templating language, called Jinja. Which from what I’ve read is similar to Django’s templating language. So maybe I should rethink my rethink? However in Flask’s favor, Jinja IMHO, based on very preliminary research, is to use their words, modeled after Django’s templates. A more powerful Django templating language? It’s starting to seem that a templating language is just a fact of life outside basic HTML. They say…

Features:

  • sandboxed execution
  • powerful automatic HTML escaping system for XSS prevention
  • template inheritance
  • compiles down to the optimal python code just in time
  • optional ahead-of-time template compilation
  • easy to debug. Line numbers of exceptions directly point to the correct line in the template.
  • configurable syntax

Also other projects such as Ansible uses Jinja2.