form.utils ========== .. py:module:: form.utils Attributes ---------- .. autoapisummary:: form.utils._unwanted_characters form.utils._html_tags form.utils.original_html_params Classes ------- .. autoapisummary:: form.utils.decimal_range Functions --------- .. autoapisummary:: form.utils.as_internal_id form.utils.get_fields_from_class form.utils.extract_text_from_html form.utils.disable_required_attribute_in_html_inputs form.utils.hash_definition form.utils.path_to_filename form.utils.remove_empty_links Module Contents --------------- .. py:data:: _unwanted_characters .. py:data:: _html_tags .. py:data:: original_html_params .. py:function:: as_internal_id(label: str) -> str .. py:function:: get_fields_from_class(cls: type[onegov.form.Form]) -> list[tuple[str, wtforms.fields.core.UnboundField[Any]]] .. py:function:: extract_text_from_html(html: str) -> str .. py:function:: disable_required_attribute_in_html_inputs() -> None Replaces the required attribute with aria-required. .. py:class:: decimal_range(start: float | decimal.Decimal, stop: float | decimal.Decimal, step: str | float | decimal.Decimal | None = None) Implementation of Python's range builtin using decimal values instead of integers. .. py:attribute:: __slots__ :value: ('start', 'stop', 'step', 'current') .. py:attribute:: stop .. py:attribute:: step .. py:method:: __repr__() -> str .. py:method:: __eq__(other: object) -> bool .. py:method:: __iter__() -> Self .. py:method:: __next__() -> decimal.Decimal .. py:function:: hash_definition(definition: str) -> str .. py:function:: path_to_filename(path: None) -> None path_to_filename(path: str) -> str .. py:function:: remove_empty_links(text: str) -> str