Writing text reports with RestructuredText

CubicWeb offers several text formats for the RichString type used in schemas, including restructuredtext.

Three additional restructuredtext roles are defined by CubicWeb:

cubicweb.ext.rest.eid_reference_role(role, rawtext, text, lineno, inliner, options={}, content=[])[source]
cubicweb.ext.rest.rql_role(role, rawtext, text, lineno, inliner, options={}, content=[])[source]

: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}.

cubicweb.ext.rest.bookmark_role(role, rawtext, text, lineno, inliner, options={}, content=[])[source]

:bookmark:`<bookmark-eid>` or :bookmark:`<eid>:<vid>`

Example: :bookmark:`1234:table`

Replace the directive with the output of applying the view to the resultset returned by the query stored in the bookmark. By default, the view is the one stored in the bookmark, but it can be overridden by the directive as in the example above.

“X eid %(userid)s” can be used in the RQL query stored in the Bookmark, for this query will be executed with the argument {‘userid’: _cw.user.eid}.