Skip to content
Myr

Fixed some incorrect docs

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 · parent 73c34f5 · Browse files · 1 file+9 added−8 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+9 added−8 removed

  • other:+9 added−8 removed

1 file+9 added−8 removed

modified:jinja2/filters.py+9 added-8 removed
840 unmodified lines
841842843@contextfilter844def do_select(*args, **kwargs):845 """Filters a sequence of objects by appying a test to either the object846 or the attribute and only selecting the ones with the test succeeding.845 """Filters a sequence of objects by appying a test to the object and only846 selecting the ones with the test succeeding.847848 Example usage:849850 .. sourcecode:: jinja851852 {{ numbers|select("odd") }}853 {{ numbers|select("odd") }}854855 .. versionadded:: 2.7856 """857 return _select_or_reject(args, kwargs, lambda x: x, False)858859860@contextfilter861def do_reject(*args, **kwargs):861 """Filters a sequence of objects by appying a test to either the object862 or the attribute and rejecting the ones with the test succeeding.862 """Filters a sequence of objects by appying a test to the object and863 rejecting the ones with the test succeeding.864865 Example usage:866867 .. sourcecode:: jinja
6 unmodified lines
874875876@contextfilter877def do_selectattr(*args, **kwargs):877 """Filters a sequence of objects by appying a test to either the object878 or the attribute and only selecting the ones with the test succeeding.878 """Filters a sequence of objects by appying a test to an attribute of an879 object and only selecting the ones with the test succeeding.880881 Example usage:882883 .. sourcecode:: jinja
7 unmodified lines
891892893@contextfilter894def do_rejectattr(*args, **kwargs):894 """Filters a sequence of objects by appying a test to either the object895 or the attribute and rejecting the ones with the test succeeding.895 """Filters a sequence of objects by appying a test to an attribute of an896 object or the attribute and rejecting the ones with the test succeeding.897898 .. sourcecode:: jinja899900 {{ users|rejectattr("is_active") }}
88 unmodified lines