agency.models.person

Classes

ExtendedPerson

An extended version of the standard person from onegov.people.

Module Contents

class agency.models.person.ExtendedPerson[source]

Bases: onegov.people.Person, onegov.org.models.extensions.AccessExtension, onegov.org.models.extensions.PublicationExtension

An extended version of the standard person from onegov.people.

__mapper_args__[source]
es_type_name = 'extended_person'[source]

Returns the unique type name of the model.

property es_public: bool[source]

Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.

es_properties[source]

Returns the type mapping of this model. Each property in the mapping will be read from the model instance.

The returned object needs to be a dict or an object that provides a to_dict method.

Internally, onegov.search stores differing languages in different indices. It does this automatically through langauge detection, or by manually specifying a language.

Note that objects with multiple languages are not supported (each object is supposed to have exactly one language).

Onegov.search will automatically insert the right analyzer for types like these.

There’s currently only limited support for properties here, namely objects and nested mappings do not work! This is going to be added in the future though.

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)

memberships: sqlalchemy.orm.relationship[onegov.core.types.AppenderQuery[onegov.agency.models.ExtendedAgencyMembership]][source]
property phone_internal: str[source]
property phone_es: list[str][source]
property location_address_html: markupsafe.Markup[source]
property postal_address_html: markupsafe.Markup[source]
property notes_html: markupsafe.Markup[source]
deletable(request: onegov.agency.request.AgencyRequest) bool[source]