Wednesday, May 27, 2015¶
There was a problem #284 (ar.show() renders to console and
not to document) which intrigued me some time. One reaction was that
I moved the
get_printable_context() method from
lino.core.requests.BaseRequest, and the
get_printable_context on a model instance now
gets the action request ar as mandatory positional argument.
While this was nice, it did not bring a solution.
The solution was to remove the following usage example from the
do text from html(ar.show('users.UsersOverview'))
This example had worked once, but broke some time ago. And I
meanwhile think that it was not a good idea. Rendering a table into
an appy.pod template is done using the table function defined by
do text from table(ar.spawn('users.UsersOverview'))
All this should be documented somewhere below Printing documents.
The ar in an appy.pod template represents the action request which asked for building the document. This request can have either a html renderer or a console renderer.