Added improved documentation to the `ContextReference` node.
--HG--
branch : trunk
diff --git a/jinja2/nodes.py b/jinja2/nodes.py
index 6720fb1..15461e8 100644
--- a/jinja2/nodes.py
+++ b/jinja2/nodes.py
@@ -821,7 +821,16 @@
class ContextReference(Expr):
- """Returns the current template context."""
+ """Returns the current template context. It can be used like a
+ :class:`Name` node, with a ``'load'`` ctx and will return the
+ current :class:`~jinja2.runtime.Context` object.
+
+ Here an example that assigns the current template name to a
+ variable named `foo`::
+
+ Assign(Name('foo', ctx='store'),
+ Getattr(ContextReference(), 'name'))
+ """
class Continue(Stmt):