ext/rest.py
changeset 10023 c3ab46842b2d
parent 9592 6fd2651719bc
child 10212 dccce2be3101
child 10952 4f28cb25b6c1
equal deleted inserted replaced
10022:927a795bb380 10023:c3ab46842b2d
    97     set_classes(options)
    97     set_classes(options)
    98     return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref,
    98     return [nodes.reference(rawtext, utils.unescape(rest), refuri=ref,
    99                             **options)], []
    99                             **options)], []
   100 
   100 
   101 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
   101 def rql_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
   102     """:rql:`<rql-expr>` or :rql:`<rql-expr>:<vid>`
   102     """``:rql:`<rql-expr>``` or ``:rql:`<rql-expr>:<vid>```
   103 
   103 
   104     Example: :rql:`Any X,Y WHERE X is CWUser, X login Y:table`
   104     Example: ``:rql:`Any X,Y WHERE X is CWUser, X login Y:table```
   105 
   105 
   106     Replace the directive with the output of applying the view to the resultset
   106     Replace the directive with the output of applying the view to the resultset
   107     returned by the query.
   107     returned by the query.
   108 
   108 
   109     "X eid %(userid)s" can be used in the RQL query for this query will be
   109     "X eid %(userid)s" can be used in the RQL query for this query will be
   130         content = 'an error occurred while interpreting this rql directive: %r' % exc
   130         content = 'an error occurred while interpreting this rql directive: %r' % exc
   131     set_classes(options)
   131     set_classes(options)
   132     return [nodes.raw('', content, format='html')], []
   132     return [nodes.raw('', content, format='html')], []
   133 
   133 
   134 def bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
   134 def bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
   135     """:bookmark:`<bookmark-eid>` or :bookmark:`<eid>:<vid>`
   135     """``:bookmark:`<bookmark-eid>``` or ``:bookmark:`<eid>:<vid>```
   136 
   136 
   137     Example: :bookmark:`1234:table`
   137     Example: ``:bookmark:`1234:table```
   138 
   138 
   139     Replace the directive with the output of applying the view to the resultset
   139     Replace the directive with the output of applying the view to the resultset
   140     returned by the query stored in the bookmark. By default, the view is the one
   140     returned by the query stored in the bookmark. By default, the view is the one
   141     stored in the bookmark, but it can be overridden by the directive as in the
   141     stored in the bookmark, but it can be overridden by the directive as in the
   142     example above.
   142     example above.