gazette.models.organization

Module Contents

Classes

Organization

Defines an organization for official notices.

OrganizationMove

Represents a single move of an adjacency list item.

class gazette.models.organization.Organization(title: str, parent: Self | None = None, **kwargs: Any)[source]

Bases: onegov.core.orm.abstract.AdjacencyList, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin

Defines an organization for official notices.

Although the categories are defined as a flexible adjacency list, we currently use it only as a two-stage adjacency list key-value list (name-title).

property in_use: bool[source]

True, if the organization is used by any notice.

__tablename__ = 'gazette_organizations'[source]
active: Column[bool | None][source]
external_name: onegov.core.orm.mixins.dict_property[str | None][source]
notices() Query[GazetteNotice][source]

Returns a query to get all notices related to this category.

title_observer(title: str) None[source]
class gazette.models.organization.OrganizationMove(session: sqlalchemy.orm.Session, subject_id: int, target_id: int, direction: onegov.core.orm.abstract.MoveDirection)[source]

Represents a single move of an adjacency list item.

classmethod for_url_template() typing_extensions.Self[source]
execute() None[source]