Skip to content
Myr

document how ContextReference relates to contextfunction

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

closes #762

authored by David Lord · committed by David Lord · parent edc0aa2 · Browse files · 1 file+5 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+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:jinja2/nodes.py+5 added
940 unmodified lines
941 variable named `foo`::942943 Assign(Name('foo', ctx='store'),944 Getattr(ContextReference(), 'name'))945946 This is basically equivalent to using the947 :func:`~jinja2.contextfunction` decorator when using the948 high-level API, which causes a reference to the context to be passed949 as the first argument to a function.950 """951952953class Continue(Stmt):
51 unmodified lines