Welcome | Get started | Dive into Lino | Contribute | Reference
lino.modlib.changes.models¶
Database models for this plugin.
It defines the Change
model. It also adds a
menu entry to the Explorer menu.
Functions
|
|
|
|
|
Calls |
|
|
|
|
|
To be called when a new instance has actually been created and saved. |
|
Log a Change if there is a change_watcher_spec. |
Classes
|
A registered change in the database. |
|
The list of possible choices for the type field of a |
|
The default table for |
|
Slave Table showing the changes related to the current object, including those applied to "child" objects. |
|
Slave Table showing the direct changes related to the current object. |
- class lino.modlib.changes.models.ChangeTypes(*args, **kw)¶
Bases:
ChoiceList
The list of possible choices for the type field of a
Change
.
- class lino.modlib.changes.models.Change(*args, **kwargs)¶
Bases:
UserAuthored
A registered change in the database.
Each database change of a watched object will generate one Change record.
- master¶
The database object which acts as "master".
- object¶
The database object which has been modified.
- class lino.modlib.changes.models.ChangesByObject(*args, **kw)¶
Bases:
Changes
Slave Table showing the direct changes related to the current object.
- master¶
alias of
ContentType
- class lino.modlib.changes.models.ChangesByMaster(*args, **kw)¶
Bases:
Changes
Slave Table showing the changes related to the current object, including those applied to "child" objects.
- master¶
alias of
ContentType
- lino.modlib.changes.models.on_update(sender=None, watcher=None, request=None, **kw)¶
Log a Change if there is a change_watcher_spec. watcher is a
lino.core.diff.ChangeWatcher
instance.
- lino.modlib.changes.models.on_delete(sender=None, request=None, **kw)¶
Calls
log_change()
with ChangeTypes.delete.Note that you must call this before actually deleting the object, otherwise mysql (not sqlite) says ERROR: (1048, "Column 'object_id' cannot be null")
- lino.modlib.changes.models.on_ui_created(sender=None, request=None, **kw)¶
To be called when a new instance has actually been created and saved.
- lino.modlib.changes.models.on_merge(sender=None, request=None, **kw)¶