General overview of Lino Shop

The goal of Lino Shop is

A tested document

This is a tested document. The following instructions are used for initialization:

>>> import lino
>>> lino.startup('lino_shop.projects.shop1.settings')
>>> from lino.api.doctest import *

webshop uses the following action specifier, which works only since 2021-03-19:

>>> from lino.core.actors import resolve_action
>>> resolve_action('shopping.MyCart.start_plan')
<BoundAction(shopping.MyCart, <lino.modlib.users.mixins.StartPlan start_plan>)>

Before 2021-03-19, resolve_action() used rt.models.resolve(), which returned the unbound action object, and then bound it to its defining actor, which is not lino_xl.lib.shopping.MyCart but lino_xl.lib.sheets.Reports (the first actor that happens to use the lino.modlib.users.StartPlan action). So this pitfall was only when your application had multiple subclasses of UserPlan that do not override the start_plan action.

>>> x = rt.models.resolve('shopping.MyCart.start_plan')
>>> x
<lino.modlib.users.mixins.StartPlan start_plan>
>>> x.defining_actor
lino_xl.lib.sheets.models.Reports