gws.base.model.value

Base model value.

Source code: gws.base.model.value

Module Contents

class gws.base.model.value.Config(*args, **kwargs)

Bases: gws.Config

Configuration for the model value.

forCreate: bool = True

The value is applied when creating a new object.

forRead: bool = True

The value is applied when reading an object.

forUpdate: bool = True

The value is applied when updating an existing object.

isDefault: bool = False

The value is used only when no other value is provided.

class gws.base.model.value.Object

Bases: gws.ModelValue

Base model value.

Provides the isDefault flag and the set of operations the value applies to. Subclasses implement compute.

configure()

Configuration hook.

Called when the node is initialized. Raising an exception here aborts the creation of the node.