:tocdepth: 3 :py:mod:`gws.base.model.field` ============================== .. py:module:: gws.base.model.field **Source code:** :source:`gws.base.model.field` Module Contents --------------- .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.ConfigWithAccess` Configuration for the model field. .. py:attribute:: isAuto :type: Optional[bool] If True, the field is auto-updated. .. py:attribute:: isPrimaryKey :type: Optional[bool] If True, the field is a primary key. .. py:attribute:: isRequired :type: Optional[bool] If True, the field is required. .. py:attribute:: isUnique :type: Optional[bool] If True, the field is unique. .. py:attribute:: name :type: str The name of the field. .. py:attribute:: title :type: Optional[str] The title of the field. .. py:attribute:: validators :type: Optional[list[gws.ext.config.modelValidator]] List of validators for the field. .. py:attribute:: values :type: Optional[list[gws.ext.config.modelValue]] List of possible values for the field. .. py:attribute:: widget :type: Optional[gws.ext.config.modelWidget] Configuration for the field widget. .. py:class:: Object Bases: :py:obj:`gws.ModelField` Model field. .. py:attribute:: formatValidator :type: gws.ModelValidator .. py:attribute:: notEmptyValidator :type: gws.ModelValidator .. py:method:: configure() Configuration hook. .. py:method:: configure_flags() .. py:method:: configure_validators() .. py:method:: configure_values() .. py:method:: configure_widget() .. py:method:: create_validator(cfg) .. py:method:: describe() .. py:method:: do_validate(feature, mc) .. py:method:: find_relatable_features(search, mc) .. py:method:: prop_to_python(feature, value, mc) .. py:method:: props(user) Generate a ``Props`` struct for this object. :param user: The user for which the props should be generated. .. py:method:: python_to_prop(feature, value, mc) .. py:method:: python_to_raw(feature, value, mc) .. py:method:: raw_to_python(feature, value, mc) .. py:method:: related_models() .. py:class:: Props(*args, **kwargs) Bases: :py:obj:`gws.Props` Object properties. .. py:attribute:: attributeType :type: gws.AttributeType .. py:attribute:: geometryType :type: gws.GeometryType .. py:attribute:: name :type: str .. py:attribute:: relatedModelUids :type: list[str] .. py:attribute:: title :type: str .. py:attribute:: type :type: str .. py:attribute:: uid :type: str Unique ID. .. py:attribute:: widget :type: gws.ext.props.modelWidget