agency.forms.agency

Classes

ExtendedAgencyForm

Form to edit agencies.

MoveAgencyForm

Form to move an agency.

Module Contents

class agency.forms.agency.ExtendedAgencyForm(formdata: 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: Mapping[str, Sequence[Any]] | None = None, **kwargs: Any)[source]

Bases: onegov.form.Form

Form to edit agencies.

title[source]
portrait[source]
location_address[source]
location_code_city[source]
postal_address[source]
postal_code_city[source]
phone[source]
phone_direct[source]
email[source]
website[source]
opening_hours[source]
organigram[source]
coordinates[source]
export_fields[source]
on_request() None[source]
get_useful_data() dict[str, Any][source]

Returns the form data in a dictionary, by default excluding data that should not be stored in the db backend.

update_model(model: onegov.agency.models.ExtendedAgency) None[source]
reorder_export_fields() None[source]
apply_model(model: onegov.agency.models.ExtendedAgency) None[source]
class agency.forms.agency.MoveAgencyForm(formdata: 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: Mapping[str, Sequence[Any]] | None = None, **kwargs: Any)[source]

Bases: onegov.form.Form

Form to move an agency.

parent_id[source]
on_request() None[source]
ensure_valid_parent() bool[source]

As a new destination (parent page) every menu item is valid except yourself. You cannot assign yourself as the new destination :return: bool

update_model(model: onegov.agency.models.ExtendedAgency) None[source]
apply_model(model: onegov.agency.models.ExtendedAgency) None[source]