DiffingMixin replaced by lino.core.changes

If an application wanted database changes to be logged, it had to subclass DiffingMixin when declaring a Model.

This approach was used by lino.modlib.notes.models.Note, lino_welfare.modlib.pcsw.models.Partner and lino_welfare.modlib.isip.models.ContractBase.

It had certain disadvantages and limits: no hook to locally change the rules, it didn’t allow to watch only the changes to certain fields, the user couldn’t easily see the history of changes to a given object.

That’s why we now have the new module lino.core.changes which replaces lino.utils.dblogger.

Instead of inheriting from DiffingMixin, application programmers now define an on_site_startup method for their lino.Lino where they call watch_changes.

Example usage see lino_welfare.settings.Lino.on_site_startup().

Continued on lino.apps.presto

There’s still much to do.