]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
document how ContextReference relates to contextfunction
authorDavid Lord <davidism@gmail.com>
Fri, 18 Oct 2019 19:03:02 +0000 (12:03 -0700)
committerDavid Lord <davidism@gmail.com>
Fri, 18 Oct 2019 19:03:33 +0000 (12:03 -0700)
closes #762

jinja2/nodes.py

index 5ab2b31954d7ed9694f84efb3fab221c399fb4f8..a951d3554bd03a948e7c6e497b82118cde01981f 100644 (file)
@@ -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.
     """