The Jinja2 template engine
Pull request Compare This branch is 792 commits behind pallets:master.
Latest commit 6327f79 Jul 5, 2012 @mitsuhiko mitsuhiko Merge pull request #137 from PaulMcMillan/improve_whitespace_docs
Improve whitespace docs to reflect reality.



Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment.


Here a small example of a Jinja template:

{% extends 'base.html' %}
{% block title %}Memberlist{% endblock %}
{% block content %}
  {% for user in users %}
    <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  {% endfor %}
{% endblock %}


Application logic is for the controller but don't try to make the life for the template designer too hard by giving him too few functionality.

For more informations visit the new Jinja2 webpage and documentation.

The Jinja2 tip is installable via easy_install with easy_install Jinja2==dev.