# HG changeset patch # User Nicolas Chauvat # Date 1362414177 -3600 # Node ID becbbbc840b8b0a836aedba67eb846e3acfbb84b # Parent 8dc0b8d92694dcb12b057531a4735de23d1b8769 [ext/rest] fix docstring of rql_role() diff -r 8dc0b8d92694 -r becbbbc840b8 ext/rest.py --- a/ext/rest.py Fri Mar 08 18:04:40 2013 +0100 +++ b/ext/rest.py Mon Mar 04 17:22:57 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:`` or :rql:`:` + + 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: