ext/rest.py
changeset 8724 1beab80aed23
parent 8697 574bb05e40a4
parent 8710 becbbbc840b8
child 8852 59a29405688c
--- a/ext/rest.py	Fri Feb 22 11:17:02 2013 +0100
+++ b/ext/rest.py	Tue Mar 12 12:04:51 2013 +0100
@@ -96,7 +96,16 @@
                             **options)], []
 
 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
-    """:rql:`Any X,Y WHERE X is CWUser, X login Y:table`"""
+    """:rql:`<rql-expr>` or :rql:`<rql-expr>:<vid>`
+
+    Example: :rql:`Any X,Y WHERE X is CWUser, X login Y:table`
+
+    Replace the directive with the output of applying the view to the resultset
+    returned by the query.
+
+    "X eid %(userid)s" can be used in the RQL query for this query will be
+    executed with the argument {'userid': _cw.user.eid}.
+    """
     _cw = inliner.document.settings.context._cw
     text = text.strip()
     if ':' in text: