gws.plugin.model_value.format

Format value.

Computes a string by applying a Python format string to the feature attributes, using gws.u.format_map.

Example:

fields+ {
    name "label"
    type "text"
    values+ { type "format" format "{street} {house_number}" }
}

Source code: gws.plugin.model_value.format

Package Contents

class gws.plugin.model_value.format.Config

Bases: gws.base.model.value.Config

Value computed by a format string over feature attributes.

format: str

Format string to apply to feature attributes.

class gws.plugin.model_value.format.Object

Bases: gws.base.model.value.Object

Format value object.

format: str

Format string.

compute(field, feature, mc)
configure()