election_day.models.election.list_connection

Classes

ListConnection

A list connection.

Module Contents

class election_day.models.election.list_connection.ListConnection[source]

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

A list connection.

__tablename__ = 'list_connections'[source]
id: Column[uuid.UUID][source]
connection_id: Column[str][source]
election_id: Column[str | None][source]
election: relationship[ProporzElection][source]
parent_id: Column[uuid.UUID | None][source]
parent: relationship[ListConnection][source]
lists: relationship[list[List]][source]
children: relationship[AppenderQuery[ListConnection]][source]
property total_votes: int[source]

Returns the total number of votes.

property total_number_of_mandates: int[source]

Returns the total number of mandates.

votes[source]
number_of_mandates[source]
aggregate_results(attribute: str) int[source]

Gets the sum of the given attribute from the results.

classmethod aggregate_results_expression(attribute: str) ColumnElement[int][source]

Gets the sum of the given attribute from the results, as SQL expression.