election_day.models.archived_result
Attributes
Classes
Stores the result of an election or vote. |
Module Contents
- election_day.models.archived_result.ResultType: TypeAlias = Literal['election', 'election_compound', 'vote'][source]
- class election_day.models.archived_result.ArchivedResult[source]
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.ContentMixin
,onegov.core.orm.mixins.TimestampMixin
,onegov.election_day.models.mixins.DomainOfInfluenceMixin
,onegov.election_day.models.mixins.TitleTranslationsMixin
Stores the result of an election or vote.
- property type_class: _type[Election | ElectionCompound | Vote][source]
- is_fetched(request: onegov.election_day.request.ElectionDayRequest) bool [source]
Returns True, if this results has been fetched from another instance.
- is_fetched_by_municipality(request: onegov.election_day.request.ElectionDayRequest) bool [source]
Returns True, if this results has been fetched from another instance by a communal instance.
- adjusted_url(request: onegov.election_day.request.ElectionDayRequest) str [source]
Returns the url adjusted to the current host. Needed if the instance is accessible under different hosts at the same time.
- display_answer(request: onegov.election_day.request.ElectionDayRequest) str [source]
Returns the answer (depending on the current instance).
- display_nays_percentage(request: onegov.election_day.request.ElectionDayRequest) float [source]
Returns the nays rate (depending on the current instance).