election_day.models.election.election
Classes
Built-in immutable sequence. |
|
Module Contents
- class election_day.models.election.election.VotesByDistrictRow[source]
Bases:
NamedTupleBuilt-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- class election_day.models.election.election.Election[source]
Bases:
onegov.core.orm.Base,onegov.core.orm.mixins.ContentMixin,onegov.election_day.models.mixins.LastModifiedMixin,onegov.election_day.models.mixins.DomainOfInfluenceMixin,onegov.election_day.models.mixins.StatusMixin,onegov.election_day.models.mixins.TitleTranslationsMixin,onegov.election_day.models.mixins.IdFromTitlesMixin,onegov.election_day.models.election.mixins.DerivedAttributesMixin,onegov.election_day.models.mixins.ExplanationsPdfMixin,onegov.election_day.models.party_result.mixins.PartyResultsOptionsMixin- title_observer(title_translations: collections.abc.Mapping[str, str], short_title_translations: collections.abc.Mapping[str, str]) None[source]
- property counted_entities: list[str][source]
The names of the already counted entities.
Might contain an empty string in case of expats.
- candidates: sqlalchemy.orm.Mapped[list[onegov.election_day.models.election.candidate.Candidate]][source]
- results: sqlalchemy.orm.Mapped[list[onegov.election_day.models.election.election_result.ElectionResult]][source]
- property results_query: sqlalchemy.orm.Query[onegov.election_day.models.election.election_result.ElectionResult][source]
- referencing_elections: sqlalchemy.orm.DynamicMapped[onegov.election_day.models.ElectionRelationship][source]
- election_compound: sqlalchemy.orm.Mapped[onegov.election_day.models.ElectionCompound | None][source]
- property completed: bool[source]
Overwrites StatusMixin’s ‘completed’ for compounds with manual completion.
- aggregate_results(attribute: str) int[source]
Gets the sum of the given attribute from the results.
- classmethod aggregate_results_expression(attribute: str) sqlalchemy.sql.ColumnElement[int][source]
Gets the sum of the given attribute from the results, as SQL expression.
- property elected_candidates: list[tuple[str, str]][source]
The first and last names of the elected candidates.
- property votes_by_district: sqlalchemy.orm.Query[VotesByDistrictRow][source]