# -*- coding: utf-8 -*- 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 Jinja2 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 %}
:copyright: (c) 2017 by the Jinja Team. :license: BSD, see LICENSE for more details. """
# high level interface
# loaders DictLoader, FunctionLoader, PrefixLoader, ChoiceLoader, \ ModuleLoader
# bytecode caches MemcachedBytecodeCache
# undefined types make_logging_undefined
# exceptions TemplateNotFound, TemplatesNotFound, TemplateSyntaxError, \ TemplateAssertionError, TemplateRuntimeError
# decorators and public utilities evalcontextfilter environmentfunction, evalcontextfunction, contextfunction, \ is_undefined, select_autoescape
'Environment', 'Template', 'BaseLoader', 'FileSystemLoader', 'PackageLoader', 'DictLoader', 'FunctionLoader', 'PrefixLoader', 'ChoiceLoader', 'BytecodeCache', 'FileSystemBytecodeCache', 'MemcachedBytecodeCache', 'Undefined', 'DebugUndefined', 'StrictUndefined', 'TemplateError', 'UndefinedError', 'TemplateNotFound', 'TemplatesNotFound', 'TemplateSyntaxError', 'TemplateAssertionError', 'TemplateRuntimeError', 'ModuleLoader', 'environmentfilter', 'contextfilter', 'Markup', 'escape', 'environmentfunction', 'contextfunction', 'clear_caches', 'is_undefined', 'evalcontextfilter', 'evalcontextfunction', 'make_logging_undefined', 'select_autoescape', ]
|