geonature.core.gn_commons.schemas#

Attributes#

log

Classes#

ModuleSchema

MediaSchema

TValidationSchema

BibWidgetSchema

LabelValueDict

CastableField

A field which tries to cast the value to int or float before returning it.

TAdditionalFieldsSchema

Module Contents#

geonature.core.gn_commons.schemas.log[source]#
class geonature.core.gn_commons.schemas.ModuleSchema[source]#

Bases: geonature.utils.env.MA.SQLAlchemyAutoSchema

class Meta[source]#
model[source]#
load_instance = True[source]#
exclude = ('module_picto', 'module_desc', 'module_group', 'module_external_url', 'module_target',...[source]#
class geonature.core.gn_commons.schemas.MediaSchema[source]#

Bases: geonature.utils.env.MA.SQLAlchemyAutoSchema

class Meta[source]#
model[source]#
load_instance = True[source]#
include_fk = True[source]#
unknown[source]#
meta_create_date[source]#
meta_update_date[source]#
make_media(data, **kwargs)[source]#
class geonature.core.gn_commons.schemas.TValidationSchema[source]#

Bases: geonature.utils.env.MA.SQLAlchemyAutoSchema

class Meta[source]#
model[source]#
load_instance = True[source]#
include_fk = True[source]#
validation_label[source]#
validator_role[source]#
class geonature.core.gn_commons.schemas.BibWidgetSchema[source]#

Bases: geonature.utils.env.MA.SQLAlchemyAutoSchema

class Meta[source]#
model[source]#
load_instance = True[source]#
class geonature.core.gn_commons.schemas.LabelValueDict[source]#

Bases: marshmallow.Schema

label[source]#
value[source]#
class geonature.core.gn_commons.schemas.CastableField[source]#

Bases: marshmallow.fields.Field

A field which tries to cast the value to int or float before returning it. If the value is not castable, the default value is returned.

_serialize(value, attr, obj, **kwargs)[source]#
class geonature.core.gn_commons.schemas.TAdditionalFieldsSchema[source]#

Bases: utils_flask_sqla.schema.SmartRelationshipsMixin, geonature.utils.env.MA.SQLAlchemyAutoSchema

class Meta[source]#
model[source]#
load_instance = True[source]#
default_value[source]#
code_nomenclature_type[source]#
modules[source]#
objects[source]#
type_widget[source]#
datasets[source]#
bib_nomenclature_type[source]#
load(data, *, many=None, **kwargs)[source]#