Previous topic

stalker.core.mixins.ScheduleMixin

Next topic

stalker.core.mixins.TaskMixin

This Page

stalker.core.mixins.StatusMixin

Inheritance diagram of stalker.core.mixins.StatusMixin

class stalker.core.mixins.StatusMixin(status=0, status_list=None, **kwargs)[source]

Bases: object

Adds statusabilities to the object.

This mixin adds status and statusList variables to the list. Any object that needs a status and a corresponding status list can include this mixin.

When mixed with a class which don’t have an __init__ method, the mixin supplies one, and in this case the parameters below must be defined.

Parameters:
  • status_list – this attribute holds a status list object, which shows the possible statuses that this entity could be in. This attribute can not be empty or None. Giving a StatusList object, the StatusList.target_entity_type should match the current class.
  • status – an integer value which is the index of the status in the status_list attribute. So the value of this attribute couldn’t be lower than 0 and higher than the length-1 of the status_list object and nothing other than an integer
__init__(status=0, status_list=None, **kwargs)[source]

Methods

__init__(**kwargs[, status, status_list])

Attributes

status The current status index of the object.
status_list The list of statuses that this object can have.
status[source]

The current status index of the object.

This is an integer value and shows the index of the Status object in the StatusList of this object.

status_list[source]

The list of statuses that this object can have.