swissvotes.models.page

Classes

TranslatablePage

A page containing translatable content.

TranslatablePageMove

Represents a single move of a page.

Module Contents

class swissvotes.models.page.TranslatablePage[source]

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

A page containing translatable content.

__tablename__ = 'swissvotes_page'[source]
id: Column[str][source]
title_translations: Column[Mapping[str, str]][source]
title[source]
content_translations: Column[Mapping[str, str]][source]
content[source]
order: Column[int | None][source]
meta: Column[dict[str, Any]][source]
show_timeline: onegov.core.orm.mixins.dict_property[bool][source]
files[source]
property siblings: Query[TranslatablePage][source]
property html_content: Markup | None[source]
get_file(name: str, request: onegov.swissvotes.request.SwissvotesRequest) onegov.swissvotes.models.file.TranslatablePageFile | None[source]
get_file_by_locale(name: str, locale: str) onegov.swissvotes.models.file.TranslatablePageFile | None[source]
slider_images[source]
class swissvotes.models.page.TranslatablePageMove(session: sqlalchemy.orm.Session, subject_id: str, target_id: str, direction: onegov.core.orm.abstract.MoveDirection)[source]

Represents a single move of a page.

session[source]
subject_id[source]
target_id[source]
direction[source]
execute() None[source]