election_day.screen_widgets.election
Classes
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
|
Abstract base class for generic types. |
Module Contents
- class election_day.screen_widgets.election.ElectionCandidatesTableWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- template = Multiline-String[source]
Show Value
""" <xsl:template match="election-candidates-table"> <div class="{@class}" tal:define="lists '{@lists}'"> <tal:block metal:use-macro="layout.macros['election-candidates-table']" tal:define="show_percentage (election.type != 'proporz')" /> </div> </xsl:template> """
- class election_day.screen_widgets.election.ElectionCandidatesByEntityTableWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.ElectionListsTableWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.ProporzElection
]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
- class election_day.screen_widgets.election.ElectionPartyStrengthsTableWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.ProporzElection
]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
- class election_day.screen_widgets.election.ElectionCandidatesChartWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ChartWidget
[onegov.election_day.models.Election
]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
- template = Multiline-String[source]
Show Value
""" <xsl:template match="election-candidates-chart"> <div class="{@class}" tal:define="limit '0{@limit}'; lists '{@lists}'; elected '{@elected}'; sort_by_lists '{@sort-by-lists}'; "> <tal:block metal:use-macro="layout.macros['candidates-chart']" /> </div> </xsl:template> """
- class election_day.screen_widgets.election.ElectionListsChartWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ChartWidget
[onegov.election_day.models.ProporzElection
]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
- class election_day.screen_widgets.election.ElectionPartyStrengthsChartWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ChartWidget
[onegov.election_day.models.ProporzElection
]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
- class election_day.screen_widgets.election.AllocatedMandatesWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.NumberOfMandatesWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.MandatesWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.ElectionTurnoutWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.AbsoluteMajorityWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.IfAbsoluteMajorityWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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
- class election_day.screen_widgets.election.IfRelateMajorityWidget(model: _E | None = None)[source]
Bases:
onegov.election_day.screen_widgets.generic.ModelBoundWidget
[onegov.election_day.models.Election
]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