1 # -*- coding: utf-8 -*-
6 Jinja2 is a template engine written in pure Python. It provides a
7 Django inspired non-XML syntax but supports inline expressions and
8 an optional sandboxed environment.
13 Here a small example of a Jinja2 template::
15 {% extends 'base.html' %}
16 {% block title %}Memberlist{% endblock %}
19 {% for user in users %}
20 <li><a href="{{ user.url }}">{{ user.username }}</a></li>
26 :copyright: 2008 by Armin Ronacher, Christoph Hack.
27 :license: BSD, see LICENSE for more details.
29 __docformat__ = 'restructuredtext en'
31 __version__ = __import__('pkg_resources') \
32 .get_distribution('Jinja2').version
34 __version__ = 'unknown'
36 # high level interface
37 from jinja2.environment import Environment, Template
40 from jinja2.loaders import BaseLoader, FileSystemLoader, PackageLoader, \
41 DictLoader, FunctionLoader, PrefixLoader, ChoiceLoader
44 from jinja2.runtime import Undefined, DebugUndefined, StrictUndefined
46 # decorators and public utilities
47 from jinja2.filters import environmentfilter, contextfilter
48 from jinja2.utils import Markup, escape, environmentfunction, contextfunction