Lino defines a few additional Django signals.
Sent exactly once per process at site startup, just before any application-specific startup actions.
Sent exactly once per process at site startup, just before Lino analyzes the models.
models_list list of models
Sent exactly once per process at site startup, just after Site has finished to analyze the models.
No longer used.
Emitted each time lino.core.utils.TestCase.setUp is called. Lino uses this signal to reset its SiteConfig cache.
It is necessary because (afaics) the Django test runner doesn't send a 'connected' signal when it restores the database to a virgin state before running a new test case.
Sent when a new model instance has been created and saved.
Sent just before a model instance is being deleted using the user interface.
request: The HttpRequest object
Sent before a database object gets saved using the web user interface.
sender the database model
instance the database object which is going to be saved.
ar the action request
Sent when a database model instance has been modified and saved using the web interface.
A receiver of this signal gets the following keyword parameters:
the database model of the instance which has been updated
ChangeWatcherobject (which contains the model instance and information about the changes)
the BaseRequest object
Sent when a model instance is being merged into another instance.
auto_createsignal is sent when
lookup_or_createsilently created a model instance.
Arguments sent with this signal:
sender: The model instance that has been created.
field: The database field
known_values: The specified known values
Sent when an MTI child has been added. Arguments to the handler are:
sender : the parent (a database object instance)
request : the HttpRequest which asks to create an MTI child
child : the child model (a class object)
lino.utils.djangotest.TestCase.setUp(), i.e. at the beginning of each test case.
receiver: the standard Django receiver decorator
lino.ui.models also defines a handler which will fire
the database_connected signal
and call the
method on each of the following signals: