A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://django-river.readthedocs.io/en/latest/api/class.html below:

Website Navigation


Class API — django-river 3.2.0 documentation

Class API¶

This page will be covering the class level API. It is all the function that you can access through your model class like in the example below;

>>> MyModel.river.my_state_field.<function>(*args)
get_on_approval_objects¶

This is the function that helps you to fetch all model objects waitig for a users approval.

>>> my_model_objects == MyModel.river.my_state_field.get_on_approval_objects(as_user=team_leader)
True
  Type Default Optional Format Description as_user input NaN False Django User

A user to find all the model objects

waiting for a user’s approvals

  Output     List<MyModel>

List of available my model objects

initial_state¶

This is a property that is the initial state in the workflow

>>> State.objects.get(label="open") == MyModel.river.my_state_field.initial_state
True
Type Format Description Output State The initial state in the workflow final_states¶

This is a property that is the list of final state in the workflow

>>> State.objects.filter(Q(label="closed") | Q(label="cancelled")) == MyModel.river.my_state_field.final_states
True
Type Format Description Output List<State> List of the final states in the workflow

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4