election_day.models.election_compound.part

Classes

inherited_attribute

ElectionCompoundPart

A part of an election compound.

Module Contents

class election_day.models.election_compound.part.inherited_attribute[T][source]
__set_name__(owner: type[Any], name: str) None[source]
__get__(instance: Any, owner: type[Any]) T[source]
class election_day.models.election_compound.part.ElectionCompoundPart(election_compound: onegov.election_day.models.ElectionCompound, domain: str, segment: str)[source]

Bases: onegov.election_day.models.election_compound.mixins.DerivedAttributesMixin, onegov.election_day.models.party_result.mixins.PartyResultsCheckMixin, onegov.election_day.models.party_result.mixins.HistoricalPartyResultsMixin

A part of an election compound.

Covers a part of an election compound between the domain of the compound and the domain of the elections.

There is no database object behind a part of an election compound, all the results are either taken from the compound (parties) or elections (candidates)-

election_compound[source]
election_compound_id[source]
domain[source]
segment[source]
id[source]
__eq__(other: object) bool[source]
date: inherited_attribute[datetime.date][source]
completes_manually: inherited_attribute[bool][source]
manually_completed: inherited_attribute[bool][source]
pukelsheim[source]
last_result_change[source]
last_change[source]
last_modified[source]
domain_elections[source]
colors[source]
voters_counts[source]
exact_voters_counts[source]
horizontal_party_strengths[source]
show_party_strengths[source]
use_historical_party_results[source]
session_manager[source]
property title: str[source]
property short_title: str | None[source]
property title_translations: dict[str, str][source]
property short_title_translations: dict[str, str][source]
property elections: list[onegov.election_day.models.Election][source]
property progress: tuple[int, int][source]
property party_results: list[onegov.election_day.models.PartyResult][source]
property has_results: bool[source]

Returns True, if the election compound has any results.

property elected_candidates: list[tuple[str, str]][source]

Returns the first and last names of the elected candidates.

property relationships_for_historical_party_results: sqlalchemy.orm.Query[onegov.election_day.models.ElectionCompoundRelationship][source]