:tocdepth: 3 :py:mod:`gws.base.model.core` ============================= .. py:module:: gws.base.model.core .. autoapi-nested-parse:: Base model. **Source code:** :source:`gws.base.model.core` Module Contents --------------- .. py:class:: ClientOptions(*args, **kwargs) Bases: :py:obj:`gws.Data` Client options for a model .. py:attribute:: keepFormOpen :type: bool :value: False Keep the edit form open after save .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.ConfigWithAccess` Model configuration .. py:attribute:: clientOptions :type: Optional[ClientOptions] Client options for a model. (added in 8.1) .. py:attribute:: excludeColumns :type: Optional[list[str]] exclude columns names from autoload .. py:attribute:: fields :type: Optional[list[gws.ext.config.modelField]] model fields .. py:attribute:: isEditable :type: bool :value: False this model is editable .. py:attribute:: loadingStrategy :type: Optional[gws.FeatureLoadingStrategy] loading strategy for features .. py:attribute:: sort :type: Optional[list[gws.SortOptions]] default sorting .. py:attribute:: tableViewColumns :type: Optional[list[TableViewColumn]] fields to include in the table view .. py:attribute:: templates :type: Optional[list[gws.ext.config.template]] feature templates .. py:attribute:: title :type: str :value: '' model title .. py:attribute:: withAutoFields :type: bool :value: False autoload non-configured model fields from the source .. py:attribute:: withTableView :type: bool :value: True enable table view for this model .. py:data:: DEFAULT_GEOMETRY_NAME :value: 'geometry' .. py:data:: DEFAULT_UID_NAME :value: 'uid' .. py:class:: Object Bases: :py:obj:`gws.Model` Data Model. .. py:method:: configure() Configuration hook. .. py:method:: configure_auto_fields() .. py:method:: configure_fields() .. py:method:: configure_geometry() .. py:method:: configure_model() Model configuration protocol. .. py:method:: configure_provider() .. py:method:: configure_sort() .. py:method:: configure_sources() .. py:method:: configure_templates() .. py:method:: configure_uid() .. py:method:: feature_from_props(props, mc) .. py:method:: feature_to_props(feature, mc) .. py:method:: feature_to_view_props(feature, mc) .. py:method:: field(name) .. py:method:: find_features(search, mc) .. py:method:: get_features(uids, mc) .. py:method:: post_configure() Post-configuration hook. .. py:method:: props(user) Generate a ``Props`` struct for this object. :param user: The user for which the props should be generated. .. py:method:: related_models() .. py:method:: table_view_columns(user) .. py:method:: validate_feature(feature, mc) .. py:class:: Props(*args, **kwargs) Bases: :py:obj:`gws.Props` Object properties. .. py:attribute:: canCreate :type: bool .. py:attribute:: canDelete :type: bool .. py:attribute:: canRead :type: bool .. py:attribute:: canWrite :type: bool .. py:attribute:: clientOptions :type: gws.ModelClientOptions .. py:attribute:: fields :type: list[gws.ext.props.modelField] .. py:attribute:: geometryCrs :type: Optional[str] .. py:attribute:: geometryName :type: Optional[str] .. py:attribute:: geometryType :type: Optional[gws.GeometryType] .. py:attribute:: isEditable :type: bool .. py:attribute:: layerUid :type: Optional[str] .. py:attribute:: loadingStrategy :type: gws.FeatureLoadingStrategy .. py:attribute:: supportsGeometrySearch :type: bool .. py:attribute:: supportsKeywordSearch :type: bool .. py:attribute:: tableViewColumns :type: list[TableViewColumn] .. py:attribute:: title :type: str .. py:attribute:: uid :type: str Unique ID. .. py:attribute:: uidName :type: Optional[str] .. py:class:: TableViewColumn(*args, **kwargs) Bases: :py:obj:`gws.Data` Basic data object. This object can be instantiated by passing one or or ``dict`` arguments and/or keyword args. All dicts keys and keywords become attributes of the object. Accessing an undefined attribute returns ``None`` and no error is raised, unless the attribute name starts with an underscore. .. py:attribute:: name :type: str .. py:attribute:: width :type: Optional[int]