org.views.people

Functions

organisations_as_dict(→ dict[str, list[str]])

get_top_level_organisations(→ list[str])

get_sub_organisations(→ list[str])

view_people(→ onegov.core.types.RenderData)

view_person(→ onegov.core.types.RenderData)

person_functions_by_organization(...)

Collects 1:1 mappings of all context-specific functions and

handle_new_person(...)

handle_edit_person(...)

handle_delete_person(→ None)

vcard_export_person(→ morepath.request.Response)

Returns the persons vCard.

Module Contents

org.views.people.organisations_as_dict(person: onegov.people.Person) dict[str, list[str]][source]
org.views.people.get_top_level_organisations(data: list[dict[str, list[str]] | str]) list[str][source]
org.views.people.get_sub_organisations(data: list[dict[str, list[str]] | str]) list[str][source]
org.views.people.view_people(self: onegov.people.PersonCollection, request: onegov.org.request.OrgRequest, layout: onegov.org.layout.PersonCollectionLayout | None = None) onegov.core.types.RenderData[source]
org.views.people.view_person(self: onegov.people.Person, request: onegov.org.request.OrgRequest, layout: onegov.org.layout.PersonLayout | None = None) onegov.core.types.RenderData[source]
org.views.people.person_functions_by_organization(subject_person: onegov.people.Person, topics: collections.abc.Iterable[onegov.org.models.Topic], request: onegov.org.request.OrgRequest) collections.abc.Iterable[markupsafe.Markup][source]
Collects 1:1 mappings of all context-specific functions and

organizations for a person. Organizations are pages where subject_person is listed as a person.

Returns an Iterable of Markup in the form:

  • Organization 1: Function A

  • Organization 2: Function B

This is not necessarily the same as person.function!

org.views.people.handle_new_person(self: onegov.people.PersonCollection, request: onegov.org.request.OrgRequest, form: onegov.org.forms.PersonForm, layout: onegov.org.layout.PersonCollectionLayout | None = None) onegov.core.types.RenderData | webob.Response[source]
org.views.people.handle_edit_person(self: onegov.people.Person, request: onegov.org.request.OrgRequest, form: onegov.org.forms.PersonForm, layout: onegov.org.layout.PersonLayout | None = None) onegov.core.types.RenderData | webob.Response[source]
org.views.people.handle_delete_person(self: onegov.people.Person, request: onegov.org.request.OrgRequest) None[source]
org.views.people.vcard_export_person(self: onegov.people.Person, request: onegov.org.request.OrgRequest) morepath.request.Response[source]

Returns the persons vCard.