Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.82 KB

README.rst

File metadata and controls

49 lines (38 loc) · 1.82 KB

Jinja2

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.

Nutshell

Here a small example of a Jinja template:

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

Philosophy

Application logic is for the controller; however, try not to make life painful for the template designer due to not enough functionality.

For more information visit the new Jinja2 webpage and documentation.

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

Builds

master image
2.7-maintenance image