gws.base.model.field

Source code: gws.base.model.field

Module Contents

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

Bases: gws.ConfigWithAccess

Basic config with permissions.

isAuto: bool | None
isPrimaryKey: bool | None
isRequired: bool | None
isUnique: bool | None
name: str
title: str | None
validators: list[gws.ext.config.modelValidator] | None
values: list[gws.ext.config.modelValue] | None
widget: gws.ext.config.modelWidget | None
class gws.base.model.field.Object

Bases: gws.ModelField

Model field.

formatValidator: gws.ModelValidator
notEmptyValidator: gws.ModelValidator
configure()

Configuration hook.

configure_flags()
configure_validators()
configure_values()
configure_widget()
create_validator(cfg)
describe()
do_validate(feature, mc)
find_relatable_features(search, mc)
prop_to_python(feature, value, mc)
props(user)

Generate a Props struct for this object.

Parameters:

user – The user for which the props should be generated.

python_to_prop(feature, value, mc)
python_to_raw(feature, value, mc)
raw_to_python(feature, value, mc)
related_models()
class gws.base.model.field.Props(*args, **kwargs)

Bases: gws.Props

Object properties.

attributeType: gws.AttributeType
geometryType: gws.GeometryType
name: str
relatedModelUids: list[str]
title: str
type: str
uid: str
widget: gws.ext.props.modelWidget