Sunday, January 4, 2026

The site_config property is now defined on the new SiteConfigCache class, which is inherited by Site as before, and also by User and AnonymousUser.

The config_id attribute is renamed to tenant_id. This corresponds to the value of the SiteConfig.id. The default tenant_id is 1.

On a multi-tenant site, User.tenant_id will become a database field.

The today(), atoday() and now() functions are also on the new SiteConfigCache class.

But we keep a limited version of today(), that does not consider SiteConfig, because we use it e.g. in lino.modlib.system.mixins:

dd.update_field(RecurrenceSet, "start_date", default=dd.today)

A callable field default value must be serializable, so it cannot depend on the tenant.

We no longer install a signal handler that calls Site.clear_site_config() when setting_changed, testcase_setup, connection_created or post_migrate are emitted.

BuildMethods.get_system_default() no longer looks up SiteConfig, but the new SiteConfigCache.get_printing_build_method does this.