A function decorator used to insert a function into designated places in the model’s logic. See the Hooks Reference for a complete list of possible hooks and the function signatures necessary to use them.
This decorator can be used bare (i.e. without parentheses) on a function whose name corresponds to a hook name. It can also take one argument, the name of the hook, to insert a function with any name into a designated hook. Further keyword arguments (e.g.
prioritize) are passed to
place — str, optional
The name of the hook in which to insert the function.
Default value: None
prioritize — bool, optional
Run the hook before all existing hooks in the queue. Note this parameter does not affect the position of the hook with respect to future functions added to the same hook.
Default value: False