Customizing how data is created¶
There are many ways to customize how to insert rows into the database.
- class lino.core.model.Model
Override this to set default values that depend on the request.
Used e.g. by
- after_ui_create(self, ar)¶
Hook to define custom behaviour to run when a user has created a new instance of this model.
SubmitInsertaction to be executed when the when the users submits an insert window.
lino.mixins.dupablefor an example of how to override it.
- create_from_choice(cls, text)¶
Called when a learning combo has been submitted. Create a persistent database object if the given text contains enough information.
- choice_text_to_dict(cls, text)¶
Return a dict of the fields to fill when the given text contains enough information for creating a new database object.
- class lino.core.actors.Actor
- allow_create = True
If this is False, the table won't have any insert_action.
- get_create_permission(self, ar)¶
Dynamic test per request.
This is being called only when