Built-in Viewsets

class viewflow.workflow.flow.FlowViewset(flow_class, **kwargs)

Basic flow viewset to include single flow into url patterns

Usage:

urlpatterns = [path("my_flow/", FlowViewset(MyFlow).urls)]
chart_view_class

alias of FlowChartView

dashboard_view_class

alias of DashboardView

has_view_permission(user, obj=None)

Determine if the user has permission to view the viewset.

Args:
user (User): The user to check permissions for. obj (Optional[Any], optional): The object being viewed.
Returns:
bool: True if the user has view permission, False otherwise.
property parent: BaseViewset | None

Get the parent viewset.

Returns:
Optional[BaseViewset]: The parent viewset, if any.
process_cancel_view_class

alias of CancelProcessView

process_detail_view_class

alias of DetailProcessView

process_list_view_class

alias of DashboardProcessListView

reverse(viewname: str, args: List[Any] | None = None, kwargs: Dict[str, Any] | None = None, current_app: str | None = None) str

Get the URL for a given viewname, including the namespace.

Args:
viewname (str): The name of the view. args (Optional[List[Any]], optional): Positional arguments for the view. kwargs (Optional[Dict[str, Any]], optional): Keyword arguments for the view. current_app (Optional[str], optional): The current application namespace.
Returns:
str: The URL for the view with the appropriate namespace
task_list_view_class

alias of DashboardTaskListView

class viewflow.workflow.flow.FlowAppViewset(flow_class, **kwargs)

Viewset includes flow as an separate App into Site.

Cookbook sample

Usage:

site = Site(
    viewsets=[
        FlowAppViewset(
            ShipmentFlow,
            icon="local_shipping",
            viewsets=[
                ShipmentCRUDViewset()
            ]
    ]
)

urlpatterns = [path("", site.urls)]
archive_view_class

alias of FlowArchiveListView

base_template_name = 'viewflow/workflow/base_page.html'

Inbox

chart_view_class

alias of FlowChartView

dashboard_view_class

alias of DashboardView

has_view_permission(user, obj=None)

Determine if the user has permission to view the viewset.

Args:
user (User): The user to check permissions for. obj (Optional[Any], optional): The object being viewed.
Returns:
bool: True if the user has view permission, False otherwise.
inbox_view_class

alias of FlowInboxListView

property parent: BaseViewset | None

Get the parent viewset.

Returns:
Optional[BaseViewset]: The parent viewset, if any.
process_cancel_view_class

alias of CancelProcessView

process_detail_view_class

alias of DetailProcessView

process_list_view_class

alias of DashboardProcessListView

queue_view_class

alias of FlowQueueListView

reverse(viewname: str, args: List[Any] | None = None, kwargs: Dict[str, Any] | None = None, current_app: str | None = None) str

Get the URL for a given viewname, including the namespace.

Args:
viewname (str): The name of the view. args (Optional[List[Any]], optional): Positional arguments for the view. kwargs (Optional[Dict[str, Any]], optional): Keyword arguments for the view. current_app (Optional[str], optional): The current application namespace.
Returns:
str: The URL for the view with the appropriate namespace
task_list_view_class

alias of DashboardTaskListView

tasks_assign_view_class

alias of BulkAssignTasksActionView

tasks_unassign_view_class

alias of BulkUnassignTasksActionView

title
class viewflow.workflow.flow.WorkflowAppViewset(flow_viewsets, **kwargs)

Viewset includes multiples flow with common Inbox/Queue/Archive views as an separate App into Site.

Life demo

Usage:

site = Site(
    viewsets=[
        WorkflowAppViewset(
            flow_viewsets=[
                FlowViewset(HelloWorldFlow, icon="assignment"),
                FlowViewset(ShipmentFlow, icon="local_shipping"),
                FlowViewset(DynamicSplitFlow, icon="tune"),
            ]
    ]
)

urlpatterns = [path("", site.urls)]
archive_view_class

alias of WorkflowArchiveListView

has_view_permission(user, obj=None)

Determine if the user has permission to view the viewset.

Args:
user (User): The user to check permissions for. obj (Optional[Any], optional): The object being viewed.
Returns:
bool: True if the user has view permission, False otherwise.
inbox_view_class

alias of WorkflowInboxListView

property parent: BaseViewset | None

Get the parent viewset.

Returns:
Optional[BaseViewset]: The parent viewset, if any.
queue_view_class

alias of WorkflowQueueListView

reverse(viewname: str, args: List[Any] | None = None, kwargs: Dict[str, Any] | None = None, current_app: str | None = None) str

Get the URL for a given viewname, including the namespace.

Args:
viewname (str): The name of the view. args (Optional[List[Any]], optional): Positional arguments for the view. kwargs (Optional[Dict[str, Any]], optional): Keyword arguments for the view. current_app (Optional[str], optional): The current application namespace.
Returns:
str: The URL for the view with the appropriate namespace
tasks_assign_view_class

alias of BulkAssignTasksActionView

tasks_unassign_view_class

alias of BulkUnassignTasksActionView