activity.models.activity

Attributes

ActivityState

ACTIVITY_STATES

Classes

Activity

Describes an activity that is made available to participants on

Module Contents

activity.models.activity.ActivityState: typing_extensions.TypeAlias[source]
activity.models.activity.ACTIVITY_STATES: tuple[ActivityState, Ellipsis] = ('preview', 'proposed', 'accepted', 'archived')[source]
class activity.models.activity.Activity[source]

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

Describes an activity that is made available to participants on certain occasions (i.e. dates).

The activity describes the what’s going on, the occasion describes when and with whom.

__tablename__ = 'activities'[source]
id: Column[uuid.UUID][source]
name: Column[str][source]
title: Column[str][source]
order: Column[str][source]
lead: dict_property[str | None][source]
text: dict_property[str | None][source]
thumbnail: dict_property[str | None][source]
_tags: Column[dict[str, str] | None][source]
username: Column[str][source]
reporter: Column[str][source]
location: Column[str | None][source]
municipality: Column[str | None][source]
user: relationship[User][source]
occasions: relationship[list[Occasion]][source]
type: Column[str][source]
state: Column[ActivityState][source]
publication_requests: relationship[list[PublicationRequest]][source]
publication_requests[source]
__mapper_args__[source]
title_observer(title: str) None[source]
username_observer(username: str) None[source]
content_observer(content: dict[str, Any] | None) None[source]
location_observer(content: str | None) None[source]
property tags: set[str][source]
propose() typing_extensions.Self[source]
accept() typing_extensions.Self[source]
archive() typing_extensions.Self[source]
create_publication_request(period: onegov.activity.models.period.Period, **kwargs: Any) onegov.activity.models.PublicationRequest[source]
property requests: onegov.activity.collections.publication_request.PublicationRequestCollection[source]
property latest_request: PublicationRequest | None[source]
request_by_period(period: onegov.activity.models.period.Period | None) PublicationRequest | None[source]
has_occasion_in_period(period: onegov.activity.models.period.Period) bool[source]