mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-12 16:26:40 +00:00
71ed7a8618
The hooks API had several issues which are summarized in this comment: https://github.com/openedx/wg-developer-experience/issues/125#issuecomment-1313553526 1. "consts" was a bad name 2. "hooks.filters" and "hooks.Filters" could easily be confused 3. docs made it difficult to understand that plugin developers should use the catalog To address these issues, we: 1. move "consts.py" to "catalog.py" 2. Remove "hooks.actions", "hooks.filters", "hooks.contexts" from the API. 3. re-organize the docs and give better usage examples in the catalog. This change is a partial fix for https://github.com/openedx/wg-developer-experience/issues/125
15 lines
514 B
ReStructuredText
15 lines
514 B
ReStructuredText
.. _hooks_api:
|
|
|
|
==========
|
|
Hook types
|
|
==========
|
|
|
|
This is the Python documentation of the two types of hooks (actions and filters) as well as the contexts system which is used to instrument them. Understanding how Tutor hooks work is useful to create plugins that modify the behaviour of Tutor. However, plugin developers should almost certainly not import these hook types directly. Instead, use the reference :ref:`hooks catalog <hooks_catalog>`.
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
actions
|
|
filters
|
|
contexts
|