directory.models.directory_entry

Classes

DirectoryEntry

A single entry of a directory.

Module Contents

class directory.models.directory_entry.DirectoryEntry[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.ContentMixin, onegov.gis.CoordinatesMixin, onegov.core.orm.mixins.TimestampMixin, onegov.search.SearchableContent, onegov.file.AssociatedFiles, onegov.core.orm.mixins.UTCPublicationMixin

A single entry of a directory.

__tablename__ = 'directory_entries'[source]
es_properties[source]

Returns the type mapping of this model. Each property in the mapping will be read from the model instance.

The returned object needs to be a dict or an object that provides a to_dict method.

Internally, onegov.search stores differing languages in different indices. It does this automatically through langauge detection, or by manually specifying a language.

Note that objects with multiple languages are not supported (each object is supposed to have exactly one language).

Onegov.search will automatically insert the right analyzer for types like these.

There’s currently only limited support for properties here, namely objects and nested mappings do not work! This is going to be added in the future though.

property es_public: bool[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

id: Column[uuid.UUID][source]
name: Column[str][source]
directory_id: Column[UUID][source]
type: Column[str][source]
order: Column[str][source]
title: Column[str][source]
lead: Column[str | None][source]
_keywords: Column[dict[str, str] | None][source]
__mapper_args__[source]
__table_args__[source]
directory: relationship[Directory][source]
property directory_name: str[source]
property keywords: set[str][source]
property text: str[source]
property values: dict[str, Any][source]