Skip to content
Myr

Change attr filter example to match description

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

foo["bar"] is an item lookup, so saying that items are not looked up with that as an example is confusing.

authored by Brandon W Maister · committed by Brandon W Maister · parent 85820fc · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:jinja2/filters.py+1 added-1 removed
776 unmodified lines
777778@environmentfilter779def do_attr(environment, obj, name):780 """Get an attribute of an object. ``foo|attr("bar")`` works like781 ``foo["bar"]`` just that always an attribute is returned and items are not781 ``foo.bar`` just that always an attribute is returned and items are not782 looked up.783784 See :ref:`Notes on subscriptions <notes-on-subscriptions>` for more details.785 """
209 unmodified lines