agency.forms.agency =================== .. py:module:: agency.forms.agency Classes ------- .. autoapisummary:: agency.forms.agency.ExtendedAgencyForm agency.forms.agency.MoveAgencyForm Module Contents --------------- .. py:class:: ExtendedAgencyForm(formdata: webob.multidict.MultiDict[str, Any] | None = None, obj: object | None = None, prefix: str = '', data: dict[str, Any] | None = None, meta: dict[str, Any] | None = None, *, extra_filters: collections.abc.Mapping[str, collections.abc.Sequence[Any]] | None = None, **kwargs: Any) Bases: :py:obj:`onegov.form.Form` Form to edit agencies. .. py:attribute:: title .. py:attribute:: portrait .. py:attribute:: location_address .. py:attribute:: location_code_city .. py:attribute:: postal_address .. py:attribute:: postal_code_city .. py:attribute:: phone .. py:attribute:: phone_direct .. py:attribute:: email .. py:attribute:: website .. py:attribute:: opening_hours .. py:attribute:: organigram .. py:attribute:: coordinates .. py:attribute:: export_fields .. py:method:: on_request() -> None .. py:method:: get_useful_data() -> dict[str, Any] Returns the form data in a dictionary, by default excluding data that should not be stored in the db backend. .. py:method:: update_model(model: onegov.agency.models.ExtendedAgency) -> None .. py:method:: reorder_export_fields() -> None .. py:method:: apply_model(model: onegov.agency.models.ExtendedAgency) -> None .. py:class:: MoveAgencyForm(formdata: webob.multidict.MultiDict[str, Any] | None = None, obj: object | None = None, prefix: str = '', data: dict[str, Any] | None = None, meta: dict[str, Any] | None = None, *, extra_filters: collections.abc.Mapping[str, collections.abc.Sequence[Any]] | None = None, **kwargs: Any) Bases: :py:obj:`onegov.form.Form` Form to move an agency. .. py:attribute:: parent_id .. py:method:: on_request() -> None .. py:method:: ensure_valid_parent() -> bool As a new destination (parent page) every menu item is valid except yourself. You cannot assign yourself as the new destination :return: bool .. py:method:: update_model(model: onegov.agency.models.ExtendedAgency) -> None .. py:method:: apply_model(model: onegov.agency.models.ExtendedAgency) -> None