election_day.utils.summaries
Attributes
Functions
|
Returns some basic informations about the given election as a JSON |
|
Returns some basic informations about the given vote as a JSON |
|
Returns some basic informations about the given election/vote as a JSON |
|
Converts the given list of election/votes to a JSON seriazable |
Module Contents
- election_day.utils.summaries.ElectionCompoundOrPart: TypeAlias = ElectionCompound | ElectionCompoundPart[source]
- election_day.utils.summaries.get_election_summary(election: onegov.election_day.models.Election | onegov.election_day.models.ArchivedResult, request: ElectionDayRequest | None, url: str | None = None) onegov.core.types.JSONObject_ro [source]
Returns some basic informations about the given election as a JSON seriazable dict.
- election_day.utils.summaries.get_election_compound_summary(election_compound: ElectionCompoundOrPart | ArchivedResult, request: ElectionDayRequest | None, url: str | None = None, type_: str = 'election_compound') onegov.core.types.JSONObject_ro [source]
- election_day.utils.summaries.get_vote_summary(vote: onegov.election_day.models.Vote | onegov.election_day.models.ArchivedResult, request: ElectionDayRequest | None, url: str | None = None) onegov.core.types.JSONObject_ro [source]
Returns some basic informations about the given vote as a JSON seriazable dict.
- election_day.utils.summaries.get_summary(item: onegov.election_day.models.Election | onegov.election_day.models.ElectionCompound | onegov.election_day.models.Vote | onegov.election_day.models.ArchivedResult, request: onegov.election_day.request.ElectionDayRequest) onegov.core.types.JSONObject_ro [source]
Returns some basic informations about the given election/vote as a JSON seriazable dict.
- election_day.utils.summaries.get_summaries(items: Iterable[Election | ElectionCompound | Vote | ArchivedResult], request: onegov.election_day.request.ElectionDayRequest) list[onegov.core.types.JSONObject_ro] [source]
Converts the given list of election/votes to a JSON seriazable list of summaries.