gazette.models.category ======================= .. py:module:: gazette.models.category Classes ------- .. autoapisummary:: gazette.models.category.Category Module Contents --------------- .. py:class:: Category(title: str, parent: Self | None = None, **kwargs: Any) Bases: :py:obj:`onegov.core.orm.abstract.AdjacencyList`, :py:obj:`onegov.core.orm.mixins.ContentMixin`, :py:obj:`onegov.core.orm.mixins.TimestampMixin` Defines a category for official notices. Although the categories are defined as an adjacency list, we currently use it only as a simple alphabetically ordered key-value list (name-title). .. py:attribute:: __tablename__ :value: 'gazette_categories' .. py:attribute:: active :type: sqlalchemy.Column[bool | None] .. py:attribute:: parent :type: sqlalchemy.orm.relationship[Category | None] .. py:method:: notices() -> sqlalchemy.orm.Query[onegov.gazette.models.notice.GazetteNotice] Returns a query to get all notices related to this category. .. py:property:: in_use :type: bool True, if the category is used by any notice. .. py:method:: title_observer(title: str) -> None Changes the category title of the notices when updating the title of the category.