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

The Lino core API

Action requests

See Using action requests

class lino.api.core.Request

Represents an action request, i.e. the context in which an action is running.

You don’t instantiate this yourself, you get it as an argument in methods you override, or as the return value of rt.login() in a tested document.

Implemented in lino.core.requests and lino.core.tablerequests

renderer

The renderer to use when processing this request.

known_values

A dict of known values used for filtering and when inserting new rows.

is_on_main_actor

Whether this request is on the main actor.

Set this explicitly to False if the JS client should remove certain information when issuing AJAX requests.

Set this explicitly to True if you want Lino to generate permalink URIs instead of javascript URIs. Used e.g. when sending email notifications with actions. Used only by renderers that make a difference (i.e. extjs). See Permalink URIs for details and test coverage.

master_instance

The database object which acts as master. This is None for master requests.

request

The incoming Django HttpRequest object that caused this action request.

obj2html(self, obj, text=None, **kwargs)

Return a HTML anchor that opens a detail window on the given database row obj.

The default representation returns the text returned by __str__() in a link that opens the detail window on the given database row.