pas.models.change

Attributes

Action

ACTIONS

Classes

Change

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

Module Contents

pas.models.change.Action: TypeAlias = Literal['add', 'edit', 'delete'][source]
pas.models.change.ACTIONS: list[Action] = ['add', 'edit', 'delete'][source]
class pas.models.change.Change[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__tablename__ = 'pas_changes'[source]
id: Column[uuid.UUID][source]
user_id: Column[str | None][source]
user_name: Column[str | None][source]
property user: str | None[source]
action: Column[Action][source]
property action_label: str[source]
model: Column[str][source]
property attendence: Attendence | None[source]
changes: dict_property[dict[str, str | int | None] | None][source]
property date: datetime.date | None[source]
property parliamentarian: Parliamentarian | None[source]
property commission: Commission | None[source]
classmethod add(request: onegov.town6.request.TownRequest, action: Action, attendence: onegov.pas.models.Attendence) Change[source]

Create a new change and add it to the session.