mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
Add example of field belonging on custom TaskState, and fix typos
This commit is contained in:
parent
d14563dfd5
commit
16966b195b
@ -6,7 +6,7 @@ The Workflow system allows users to create tasks, which represent stages of mode
|
|||||||
|
|
||||||
Wagtail provides one built in task type: ``GroupApprovalTask``, which allows any user in specific groups to approve or reject moderation.
|
Wagtail provides one built in task type: ``GroupApprovalTask``, which allows any user in specific groups to approve or reject moderation.
|
||||||
|
|
||||||
However, it is possible to add your task types in code. Instances of your custom task can then be created in the ``Tasks`` section of the Wagtail Admin.
|
However, it is possible to add your own task types in code. Instances of your custom task can then be created in the ``Tasks`` section of the Wagtail Admin.
|
||||||
|
|
||||||
Task models
|
Task models
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@ -47,7 +47,7 @@ For example:
|
|||||||
|
|
||||||
|
|
||||||
Any fields that shouldn't be edited after task creation - for example, anything that would fundamentally change the meaning of the task in any history logs -
|
Any fields that shouldn't be edited after task creation - for example, anything that would fundamentally change the meaning of the task in any history logs -
|
||||||
can be added to ``exlude_on_edit``. For example:
|
can be added to ``exclude_on_edit``. For example:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
@ -71,8 +71,9 @@ can be added to ``exlude_on_edit``. For example:
|
|||||||
Custom TaskState models
|
Custom TaskState models
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
You might also need to store custom state information for the task. Normally, this is done on an instance of ``TaskState``, which is created when a page starts
|
You might also need to store custom state information for the task: for example, a comment left by an approving user.
|
||||||
the task. However, this can also be subclassed equivalently to ``Task``:
|
Normally, this is done on an instance of ``TaskState``, which is created when a page starts the task. However, this can
|
||||||
|
also be subclassed equivalently to ``Task``:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user