Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

Stories

A story is an iterable of things that can be rendered. Each item or “chunk” of a story is one of the following:

  • a table or other actor (a subclass of lino.core.actors.ACtor)

  • an action request on a table or other actor (an instance of lino.core.tablerequest.TableRequest)

  • an etree element (ElementTree)

  • a dashboard item (an instance of lino.core.dashboard.DashboardItem)

lino.core.renderer.Render has a method show_story which “renders” a story. Different renderer subclasses render stories (and tables and other things) differently.

The base class does the actual work of looping over the story and deciding how to render it. It returns an HTML elementtree DIV element.

TextRenderer does almost the same, but prints everything to stdout. This is used in doctests where we don’t want to worry about implementation details.