election_day.screen_widgets.generic
===================================
.. py:module:: election_day.screen_widgets.generic
Attributes
----------
.. autoapisummary::
election_day.screen_widgets.generic.Entity
Classes
-------
.. autoapisummary::
election_day.screen_widgets.generic.H1Widget
election_day.screen_widgets.generic.H2Widget
election_day.screen_widgets.generic.H3Widget
election_day.screen_widgets.generic.PWidget
election_day.screen_widgets.generic.HRWidget
election_day.screen_widgets.generic.GridRowWidget
election_day.screen_widgets.generic.GridColumnWidget
election_day.screen_widgets.generic.PrincipalLogoWidget
election_day.screen_widgets.generic.QrCodeWidget
election_day.screen_widgets.generic.ModelBoundWidget
election_day.screen_widgets.generic.ModelTitleWidget
election_day.screen_widgets.generic.IfCompletedWidget
election_day.screen_widgets.generic.IfNotCompletedWidget
election_day.screen_widgets.generic.ModelProgressWidget
election_day.screen_widgets.generic.CountedEntitiesWidget
election_day.screen_widgets.generic.ChartWidget
election_day.screen_widgets.generic.LastResultChangeWidget
election_day.screen_widgets.generic.NumberOfCountedEntitiesWidget
election_day.screen_widgets.generic.TotalEntitiesWidget
Module Contents
---------------
.. py:type:: Entity
:canonical: Election | ElectionCompound | Vote
.. py:class:: H1Widget
.. py:attribute:: tag
:value: 'h1'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: '
'
.. py:class:: H2Widget
.. py:attribute:: tag
:value: 'h2'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: H3Widget
.. py:attribute:: tag
:value: 'h3'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: PWidget
.. py:attribute:: tag
:value: 'p'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: HRWidget
.. py:attribute:: tag
:value: 'hr'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: '
'
.. py:class:: GridRowWidget
.. py:attribute:: tag
:value: 'grid-row'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: GridColumnWidget
.. py:attribute:: tag
:value: 'grid-column'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: PrincipalLogoWidget
.. py:attribute:: tag
:value: 'principal-logo'
.. 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:: QrCodeWidget
.. py:attribute:: tag
:value: 'qr-code'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: qr_code(url: str) -> str
:staticmethod:
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: ModelBoundWidget[E: Entity](model: E | None = None)
.. py:attribute:: model
:value: None
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: ModelTitleWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'model-title'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: IfCompletedWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'if-completed'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: IfNotCompletedWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'if-not-completed'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: ModelProgressWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'model-progress'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: CountedEntitiesWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'counted-entities'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${entities}
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: ChartWidget[E: Entity](model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`E`\ ]
.. py:method:: get_variables(layout: onegov.election_day.layouts.DefaultLayout) -> dict[str, Any]
.. py:class:: LastResultChangeWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'last-result-change'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${layout.format_date(layout.last_result_change, 'datetime_long')}
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: NumberOfCountedEntitiesWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'number-of-counted-entities'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${layout.format_number(model.progress[0])}
"""
.. raw:: html
.. py:attribute:: usage
:value: ''
.. py:class:: TotalEntitiesWidget(model: E | None = None)
Bases: :py:obj:`ModelBoundWidget`\ [\ :py:obj:`Entity`\ ]
.. py:attribute:: tag
:value: 'total-entities'
.. py:attribute:: template
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
${layout.format_number(model.progress[1])}
"""
.. raw:: html
.. py:attribute:: usage
:value: ''