workflow.serializers
Overview
DRF serializers and mixins for workflow state and available transitions.
Classes
workflow_field_model_info
Fill in the database and model types of the workflow state fields in model_fields metadata.
workflow_state_code and workflow_state_name source through WorkflowModelMethods.workflow_state, a property with no model field of its own, so resolve_serializer_field_model_field can never describe their type_db or type_model. State.code and State.name are always real CharField columns.
Signature
workflow_field_model_info(fields)
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| fields | yes |
Source
server/vueda/workflow/serializers.py:47
workflow_serializer_fields
Return new instances of the fields that a workflow model's serializers receive.
WorkflowFieldsSerializerMixin adds them to each VuedaSerializer of a model that enables class Vueda.Workflow, unless its Meta sets workflow_fields = False. A default list shows the state's name. Its code repeats that as a machine value, and the per-record transitions belong on the detail view.
Signature
workflow_serializer_fields()
Source
server/vueda/workflow/serializers.py:30
Source
server/vueda/workflow/serializers.py