Skip to content

matreecho/jinja2

 
 

Repository files navigation

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 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.

Builds

master https://travis-ci.org/mitsuhiko/jinja2.svg?branch=master
2.7-maintenance https://travis-ci.org/mitsuhiko/jinja2.svg?branch=2.7-maintenance

Packages

No packages published

Languages

  • Python 97.7%
  • HTML 1.1%
  • Other 1.2%