Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.core.userprefs¶
The user preferences registry.
Application code should get the preferences for a user by calling
lino.modlib.users.User.get_preferences()
which returns an object
of this class.
There is one instance per user which will be created upon first request.
After instantiating a preferences object, Lino calls the
setup_user_prefs
of
every installed plugin once on it. This feature is used by
lino.modlib.dashboard
).
Functions
|
Return a list of all available dashboard items for this user. |
Classes
|
A volatile singleton which holds |
|
A volatile object which holds the preferences of a user. |
- lino.core.userprefs.get_available_items(user)¶
Return a list of all available dashboard items for this user.
This does not call
setup_user_prefs()
of installed plugins.
- class lino.core.userprefs.UserPrefs(site, user)¶
Bases:
object
A volatile object which holds the preferences of a user.
- dashboard_items¶
A list of the items to be displayed in the dashboard (see
admin_main.html
). Every item is an instance ofDashboardItem
or subclass thereof.