gws.base.model.field

Source code: gws.base.model.field

Module Contents

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

Bases: gws.ConfigWithAccess

Configuration for the model field.

isAuto: bool | None

If True, the field is auto-updated.

isPrimaryKey: bool | None

If True, the field is a primary key.

isRequired: bool | None

If True, the field is required.

isUnique: bool | None

If True, the field is unique.

name: str

The name of the field.

title: str | None

The title of the field.

validators: list[gws.ext.config.modelValidator] | None

List of validators for the field.

values: list[gws.ext.config.modelValue] | None

List of possible values for the field.

widget: gws.ext.config.modelWidget | None

Configuration for the field widget.

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

Unique ID.

widget: gws.ext.props.modelWidget