Skip to content
Myr

Merge branch 'master' of github.com:mitsuhiko/jinja2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents 6fa6cb0, 6336e77 · Browse files · 2 files+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−4 removed

  • other:+4 added−4 removed

2 files+4 added−4 removed

modified:docs/templates.rst+3 added-3 removed
1178 unmodified lines
11791180.. class:: joiner(sep=', ')11811182 A tiny helper that can be use to "join" multiple sections. A joiner is1183 passed a string and will return that string every time it's calld, except1183 passed a string and will return that string every time it's called, except1184 the first time in which situation it returns an empty string. You can1185 use this to join things::11861187 {% set pipe = joiner("|") %}
87 unmodified lines
1275 {{ gettext('Hello World!') }}1276 {{ gettext('Hello %(name)s!', name='World') }}1277 {{ ngettext('%(num)d apple', '%(num)d apples', apples|count) }}12781279Note that the `ngettext` function's format string automatically recieves1279Note that the `ngettext` function's format string automatically receives1280the count as `num` parameter additionally to the regular parameters.128112821283Expression Statement
10 unmodified lines
1294~~~~~~~~~~~~~12951296If the application enables the :ref:`loopcontrols-extension` it's possible to1297use `break` and `continue` in loops. When `break` is reached, the loop is1298terminated, if `continue` is eached the processing is stopped and continues1298terminated; if `continue` is reached, the processing is stopped and continues1299with the next iteration.13001301Here a loop that skips every second item::1302
64 unmodified lines
modified:CHANGES+1 added-1 removed
21 unmodified lines
22 security. (For instance limit the mathematical operators to actual23 integers instead of longs)24- groupby filter now supports dotted notation for grouping by attributes25 of attributes.26- scoped blocks not properly treat toplevel assignments and imports.26- scoped blocks now properly treat toplevel assignments and imports.27 Previously an import suddenly "disappeared" in a scoped block.28- automatically detect newer Python interpreter versions before loading code29 from bytecode caches to prevent segfaults on invalid opcodes. The segfault30 in earlier Jinja2 versions here was not a Jinja2 bug but a limitation in
247 unmodified lines