Jinja

_images/jinja-logo.png

Jinja is a modern and designer-friendly templating language for Python,modelled after Django’s templates. It is fast, widely used and securewith the optional sandboxed template execution environment:

  1. <title>{% block title %}{% endblock %}</title>
  2. <ul>
  3. {% for user in users %}
  4. <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  5. {% endfor %}
  6. </ul>

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 tothe correct line in the template.

  • configurable syntax

Contents: