*** Welcome to piglix ***

Jinja (template engine)

Jinja
Original author(s) Armin Ronacher
Development status Active
Written in Python
Type Template engine
License BSD License
Website jinja.pocoo.org

Jinja is a template engine for the Python programming language and is licensed under a BSD License created by Armin Ronacher. It is similar to the Django template engine but provides Python-like expressions while ensuring that the templates are evaluated in a sandbox. It is a text-based template language and thus can be used to generate any markup as well as sourcecode.

The Jinja template engine allows customization of tags, filters, tests, and globals. Also, unlike the Django template engine, Jinja allows the template designer to call functions with arguments on objects. Jinja is Flask's default template engine.

Some of the features of Jinja are:

Jinja, like Smarty, also ships with an easy-to-use filter system similar to the Unix pipeline.

Here is a small example of a template file 'example.html.jinja'

and templating code:

This produces the HTML string:


...
Wikipedia

...