election_day.screen_widgets.vote
================================
.. py:module:: election_day.screen_widgets.vote
Classes
-------
.. autoapisummary::
election_day.screen_widgets.vote.VoteCounterProposalTitleWidget
election_day.screen_widgets.vote.VoteTieBreakerTitleWidget
election_day.screen_widgets.vote.VoteProposalResultBarWidget
election_day.screen_widgets.vote.VoteCounterProposalResultBarWidget
election_day.screen_widgets.vote.VoteTieBreakerResultBarWidget
election_day.screen_widgets.vote.VoteProposalEntitiesTableWidget
election_day.screen_widgets.vote.VoteCounterProposalEntitiesTableWidget
election_day.screen_widgets.vote.VoteTieBreakerEntitiesTableWidget
election_day.screen_widgets.vote.VoteProposalEntitiesMap
election_day.screen_widgets.vote.VoteCounterProposalEntitiesMap
election_day.screen_widgets.vote.VoteTieBreakerEntitiesMap
election_day.screen_widgets.vote.VoteProposalDistrictsMap
election_day.screen_widgets.vote.VoteCounterProposalDistrictsMap
election_day.screen_widgets.vote.VoteTieBreakerDistrictsMap
election_day.screen_widgets.vote.VoteProposalTurnoutWidget
election_day.screen_widgets.vote.VoteCounterProposalTurnoutWidget
election_day.screen_widgets.vote.VoteTieBreakerTurnoutWidget
Module Contents
---------------
.. py:class:: VoteCounterProposalTitleWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-title'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: VoteTieBreakerTitleWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-title'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: VoteProposalResultBarWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-proposal-result-bar'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteCounterProposalResultBarWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-result-bar'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteTieBreakerResultBarWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-result-bar'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteProposalEntitiesTableWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-proposal-entities-table'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteCounterProposalEntitiesTableWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-entities-table'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteTieBreakerEntitiesTableWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-entities-table'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteProposalEntitiesMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-proposal-entities-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteCounterProposalEntitiesMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-entities-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteTieBreakerEntitiesMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-entities-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteProposalDistrictsMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-proposal-districts-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteCounterProposalDistrictsMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-districts-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteTieBreakerDistrictsMap(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-districts-map'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteProposalTurnoutWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.Vote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-proposal-turnout'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${'{0:.2f}'.format(proposal.turnout)} %
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteCounterProposalTurnoutWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-counter-proposal-turnout'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${'{0:.2f}'.format(counter_proposal.turnout)} %
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: VoteTieBreakerTurnoutWidget(model: _E | None = None)
Bases: :py:obj:`onegov.election_day.screen_widgets.generic.ModelBoundWidget`\ [\ :py:obj:`onegov.election_day.models.ComplexVote`\ ]
Abstract base class for generic types.
A generic type is typically declared by inheriting from
this class parameterized with one or more type variables.
For example, a generic mapping type might be defined as::
class Mapping(Generic[KT, VT]):
def __getitem__(self, key: KT) -> VT:
...
# Etc.
This class can then be used as follows::
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
try:
return mapping[key]
except KeyError:
return default
.. py:attribute:: tag
:value: 'vote-tie-breaker-turnout'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${'{0:.2f}'.format(tie_breaker.turnout)} %
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]