kerno.action module

An abstract base for class-based actions.

class kerno.action.Action(peto: kerno.peto.AbstractPeto)[source]

Bases: object

Abstract base for class-based actions.

Subclasses must implement __call__() and, if happy, return a Rezulto instance:

from kerno.action import Action
from kerno.state import Rezulto

class MyAction(Action):
    def __call__(self, *a, **kw) -> Rezulto:
        ...
property kerno

Return the global application object.

property repo

Return a repository instance for the current request.

property user

Return the current user or None.