Skip to content
Myr

add examples showing > 1 argument in filter

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

This is implied but poorly documented. A few examples make it clear.

authored by tedder · committed by tedder · parent b5eee90 · Browse files · 1 file+3 added−0 removed
This commit

State

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

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:jinja2/filters.py+3 added
863 unmodified lines
864 .. sourcecode:: jinja865866 {{ numbers|select("odd") }}867 {{ numbers|select("odd") }}868 {{ numbers|select("divisibleby", 3) }}869 {{ numbers|select("lessthan", 42) }}870 {{ strings|select("equalto", "mystring") }}871872 .. versionadded:: 2.7873 """874 return select_or_reject(args, kwargs, lambda x: x, False)
202 unmodified lines