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

lino_xl.lib.stars.models

Database models for lino_xl.lib.stars.

Functions

Create_Stars_From_Scratch()

Function to re-create logical stars after updateing Jane with the new Star model

welcome_messages(ar)

Yield a message "Your stars are X, Y, ..." for the welcome page.

Classes

AllStars(*args, **kw)

AllStarsByController(*args, **kw)

MyStars(*args, **kw)

Star(*args, **kwargs)

Represents the fact that a given database object is starred by a given User.

Stars(*args, **kw)

StarsByController(*args, **kw)

class lino_xl.lib.stars.models.Star(*args, **kwargs)

Bases: UserAuthored, Controllable

Represents the fact that a given database object is starred by a given User.

owner

The starred database object

user

The starring user (pointer to :class:lino.modlib.users.models.User`

nickname
master

The starred object that caused this stared object

classmethod for_obj(obj, **kwargs)

Return a queryset of Star instances for the given database object.

classmethod for_model(model, **kwargs)

Return a queryset of Star instances for the given database model.

classmethod for_master_model(model, **kwargs)

Return a queryset of master Star instances for the given database model.

lino_xl.lib.stars.models.welcome_messages(ar)

Yield a message “Your stars are X, Y, …” for the welcome page.

This message mentions all starred objects of the requesting user and whose nickname is not empty.

lino_xl.lib.stars.models.Create_Stars_From_Scratch()

Function to re-create logical stars after updateing Jane with the new Star model