ballot.models.election.list_connection

Module Contents

Classes

ListConnection

A list connection.

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

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

A list connection.

property total_votes: int[source]

Returns the total number of votes.

property total_number_of_mandates: int[source]

Returns the total number of mandates.

__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]
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.