A fast and easy to use template engine written in pure Python

Edit Package python-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. Here a small example of a Jinja template:

{% extends 'base.html' %}
{% block title %}Memberlist{% endblock %}
{% block content %}


{% for user in users %}
{{ user.username }}
{% endfor %}

{% endblock %}
Refresh
Refresh
Source Files
Filename Size Changed
Jinja2-2.11.1.tar.gz 0000258043 252 KB
python-Jinja2.changes 0000020195 19.7 KB
python-Jinja2.spec 0000002738 2.67 KB
Revision 38 (latest revision is 53)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 778074 from Ondřej Súkup's avatar Ondřej Súkup (mimi_vx) (revision 38)
- disable tests on 32bit archs

 
- update to 2.11.1
 * Fix a bug that prevented looking up a key after an attribute
   ({{ data.items[1:] }}) in an async template
 * Drop support for Python 2.6, 3.3, and 3.4. This will be the last version
   to support Python 2.7 and 3.5.
 * Added a new ChainableUndefined class to support getitem and getattr
   on an undefined object.
 * Allow {%+ syntax (with NOP behavior) when lstrip_blocks is disabled.
 * Added a default parameter for the map filter.
 * Exclude environment globals from meta.find_undeclared_variables().
 * Float literals can be written with scientific notation, like 2.56e-3.
 * Int and float literals can be written with the ‘_’ separator
   for legibility, like 12_345.
 * Fix a bug causing deadlocks in LRUCache.setdefault
 * The trim filter takes an optional string of characters to trim.
 * A new jinja2.ext.debug extension adds a {% debug %} tag to quickly dump
   the current context and available filters and tests.
 * Lexing templates with large amounts of whitespace is much faster.
 * Parentheses around comparisons are preserved, so {{ 2 * (3 < 5) }} outputs
   “2” instead of “False”.
 * Add new boolean, false, true, integer and float tests.
 * The environment’s finalize function is only applied to the output of expressions
   (constant or not), not static template data.
 * When providing multiple paths to FileSystemLoader, a template can have
   the same name as a directory.
 * Always return Undefined when omitting the else clause in a {{ 'foo' if bar }}
   expression, regardless of the environment’s undefined class. Omitting
Comments 0
openSUSE Build Service is sponsored by