system : Site-wide system settings¶
lino.modlib.system plugin defines some system features that are
automatically installed with every Lino application.
It especially provides the
This is a tested document. The following instructions are used for initialization:
>>> import lino >>> lino.startup('lino_book.projects.min9.settings') >>> from lino.api.doctest import *
Lino provides a standard method for defining persistent site parameters that are editable by end users (at least for those who have access permission).
- class lino.modlib.system.SiteConfig¶
A singleton database object used to store persistent site parameters.
This model has exactly one instance, which is accessible as the
The default build method to use when rendering printable documents.
If this field is empty, Lino uses the value found in
A constant user-defined date to be substituted as current system date.
This should be empty except in situations such as a posteriori data entry in a prototype.
If no plugin named 'contacts' is installed, then this is a dummy field and always contains None.
- class lino.modlib.system.SiteConfigManager¶
Always return the cached instance which holds the one and only database instance.
This is to avoid the following situation:
User 1 opens thedialog
User 2 creates a new Person (which increases next_partner_id)
User 1 clicks on Save.
next_partner_id may not get overwritten by its old value when User 1 clicks "Save".
- class lino.modlib.system.Lockable¶
Mixin to add row-level edit locking to any model.
Models with row-level edit locking are not editable in detail view by default. All form fields are disabled. The user must click Edit in order to request an edit lock for that row. This will enable all fields (except those which are disabled for some other reason).
Caveats: locking a row and then navigating away without changing anything will leave the row locked.
- class lino.modlib.system.BuildSiteCache¶
Rebuild the site cache. This action is available on
- class lino.modlib.system.SiteConfigs¶
The table used to present the
SiteConfigrow in a Detail form.
- class lino.modlib.system.BleachChecker¶
A data checker used to find unbleached html content.
- class lino.modlib.system.Genders¶
Defines the two possible choices "male" and "female" for the gender of a person.
It is used for deciding the salutation (Mr/Mrs) and for its
mf()method. So I don't see why we would need a third gender in Lino.
- class lino.modlib.system.YesNo¶
A choicelist with two values "Yes" and "No".
Used e.g. to define parameter panel fields for BooleanFields:
foo = dd.YesNo.field(_("Foo"), blank=True)
- class lino.modlib.system.ObservedEvent¶
Base class for choices of "observed event"-style choicelists.
- class lino.modlib.system.PeriodEvents¶
The list of things you can observe on a
- class lino.modlib.system.TimeZones¶