Templatehook
hypha.core.templatehook
¶
TemplateHook
¶
Bases: object
A hook for templates. This can be used directly or through the class:
Hook
dispatcher
:param list providing_args: A list of the arguments this hook can pass along in a func:
.__call__
Source code in hypha/core/templatehook.py
Hook
¶
Bases: object
Dynamic dispatcher (proxy) for class:
TemplateHook
register
¶
Register a new callback. When the name/id is not found a new hook is created under its name, meaning the hook is usually created by the first registered callback
:param str name: Hook name :param callable func: A func reference (callback)
Source code in hypha/core/templatehook.py
unregister
¶
Remove a previously registered callback
:param str name: Hook name :param callable func: A function reference that was registered previously
Source code in hypha/core/templatehook.py
unregister_all
¶
Remove all callbacks
:param str name: Hook name