From: David Lord Date: Fri, 18 Oct 2019 19:03:02 +0000 (-0700) Subject: document how ContextReference relates to contextfunction X-Git-Tag: 2.11.0~38^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91db0b56f8c4bf1ab6c0eaaee7c585f595a699e;p=thirdparty%2Fjinja.git document how ContextReference relates to contextfunction closes #762 --- diff --git a/jinja2/nodes.py b/jinja2/nodes.py index 5ab2b319..a951d355 100644 --- a/jinja2/nodes.py +++ b/jinja2/nodes.py @@ -942,6 +942,11 @@ class ContextReference(Expr): Assign(Name('foo', ctx='store'), Getattr(ContextReference(), 'name')) + + This is basically equivalent to using the + :func:`~jinja2.contextfunction` decorator when using the + high-level API, which causes a reference to the context to be passed + as the first argument to a function. """