election_day.layouts.election

Attributes

NestedMenu

Classes

ElectionLayout

A common base layout for election and votes which caches some values

Module Contents

election_day.layouts.election.NestedMenu: TypeAlias = list[tuple[str, str, bool, 'NestedMenu']][source]
class election_day.layouts.election.ElectionLayout(model: onegov.election_day.models.Election, request: onegov.election_day.request.ElectionDayRequest, tab: str | None = None)[source]

Bases: onegov.election_day.layouts.detail.DetailLayout

A common base layout for election and votes which caches some values used in the macros.

model: onegov.election_day.models.Election[source]
tab[source]
tabs_with_embedded_tables = ('lists', 'candidates', 'party-strengths', 'statistics', 'connections')[source]
property all_tabs: tuple[str, Ellipsis][source]
property has_districts: bool[source]
title(tab: str | None = None) str[source]
subtitle(tab: str | None = None) str[source]
tab_visible(tab: str | None) bool[source]
property visible: bool[source]
property type: str[source]
property majorz: bool[source]
property proporz: bool[source]
property tacit: bool[source]
property has_candidates: bool[source]
property has_party_results: bool[source]
property has_party_panachage_results: bool[source]
property summarize: bool[source]
property main_view: str[source]
property menu: NestedMenu[source]
property pdf_path: str | None[source]

Returns the path to the PDF file or None, if it is not available.

property svg_path: str | None[source]

Returns the path to the SVG or None, if it is not available.

Returns a link to the SVG download view.

property svg_name: str[source]

Returns a nice to read SVG filename.

property related_elections: list[tuple[str | None, str]][source]
property results: list[ElectionResult][source]