Skip to content
Myr

updated jinja docs

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

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 316157d · Browse files · 3 files+10 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

3 files+10 added−4 removed

  • other:+10 added−4 removed

3 files+10 added−4 removed

modified:docs/jinjaext.py+1 added-1 removed
42 unmodified lines
43 Name.Tag: 'bold #686868',44 Name.Decorator: '#686868',4546 String: '#BE9B5D',47 Number: '#FF0000',47 Number: '#444444',4849 Generic.Heading: 'bold #000080',50 Generic.Subheading: 'bold #800080',51 Generic.Deleted: '#aa0000',
71 unmodified lines
modified:docs/templates.rst+7 added-1 removed
576 unmodified lines
577578If Expression579~~~~~~~~~~~~~580581blah581It is also possible to use inline `if` expressions. These are useful in some582situations. For example you can use this to extend from one template if a583variable is defined, otherwise from the default layout template:584585.. sourcecode:: jinja586587 {% extends layout_template if layout_template is defined else 'master.html' %}588589590.. _builtin-filters:591592List of Builtin Filters593-----------------------
10 unmodified lines
modified:jinja2/filters.py+2 added-2 removed
110 unmodified lines
111 ...112 </ul>113114 As you can see it automatically prepends a space in front of the item115 if the filter returned something unless the second parameter is `False`.115 if the filter returned something unless the second parameter is false.116 """117 rv = u' '.join(118 u'%s="%s"' % (escape(key), escape(value))119 for key, value in dict(*args, **kwargs).iteritems()
420 unmodified lines
540541542def do_sort(value, reverse=False):543 """Sort a sequence. Per default it sorts ascending, if you pass it544 `True` as first argument it will reverse the sorting.544 true as first argument it will reverse the sorting.545 """546 return sorted(value, reverse=reverse)547548
125 unmodified lines