people.models.person

Classes

Person

A person.

Module Contents

class people.models.person.Person[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin, onegov.search.ORMSearchable, onegov.core.orm.mixins.UTCPublicationMixin

A person.

__tablename__ = 'people'[source]
type: Column[str][source]
__mapper_args__[source]
es_public = True[source]
es_properties[source]
property es_suggestion: tuple[str, Ellipsis][source]

Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere.

If a single string is returned, the completion input equals the completion output. (My Title -> My Title)

If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title)

property title: str[source]

Returns the Eastern-ordered name.

property spoken_title: str[source]

Returns the Western-ordered name. Includes the academic title if available.

id: Column[uuid.UUID][source]
salutation: Column[str | None][source]
academic_title: Column[str | None][source]
first_name: Column[str][source]
last_name: Column[str][source]
born: Column[str | None][source]
profession: Column[str | None][source]
function: Column[str | None][source]
political_party: Column[str | None][source]
parliamentary_group: Column[str | None][source]
picture_url: Column[str | None][source]
email: Column[str | None][source]
phone: Column[str | None][source]
phone_direct: Column[str | None][source]
website: Column[str | None][source]
website_2: Column[str | None][source]
address: Column[str | None][source]
location_address: Column[str | None][source]
location_code_city: Column[str | None][source]
postal_address: Column[str | None][source]
postal_code_city: Column[str | None][source]
notes: Column[str | None][source]
vcard_object(exclude: Collection[str] | None = None, include_memberships: bool = True) vobject.base.Component[source]

Returns the person as vCard (3.0) object.

Allows to specify the included attributes, provides a reasonable default if none are specified. Always includes the first and last name.

vcard(exclude: Collection[str] | None = None) str[source]

Returns the person as vCard (3.0).

Allows to specify the included attributes, provides a reasonable default if none are specified. Always includes the first and last name.

property memberships_by_agency: list[onegov.people.models.AgencyMembership][source]

Returns the memberships sorted alphabetically by the agency.