pas.models.parliamentarian

Attributes

Gender

GENDERS

SHIPPING_METHODS

Classes

Parliamentarian

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded

Module Contents

pas.models.parliamentarian.Gender: TypeAlias = Literal['male', 'female'][source]
pas.models.parliamentarian.GENDERS: dict[Gender, str][source]
pas.models.parliamentarian.SHIPPING_METHODS: dict[ShippingMethod, str][source]
class pas.models.parliamentarian.Parliamentarian[source]

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

Mixin providing a meta/content JSON pair. Meta is a JSON column loaded with each request, content is a JSON column loaded deferred (to be shown only in the detail view).

__tablename__ = 'pas_parliamentarians'[source]
es_public = False[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)

property title: str[source]
id: Column[uuid.UUID][source]
first_name: Column[str][source]
last_name: Column[str][source]
personnel_number: Column[str | None][source]
contract_number: Column[str | None][source]
gender: Column[Gender][source]
property gender_label: str[source]
shipping_method: Column[ShippingMethod][source]
property shipping_method_label: str[source]
shipping_address: Column[str | None][source]
shipping_address_addition: Column[str | None][source]
shipping_address_zip_code: Column[str | None][source]
shipping_address_city: Column[str | None][source]
private_address: Column[str | None][source]
private_address_addition: Column[str | None][source]
private_address_zip_code: Column[str | None][source]
private_address_city: Column[str | None][source]
date_of_birth: Column[date | None][source]
date_of_death: Column[date | None][source]
place_of_origin: Column[str | None][source]
occupation: Column[str | None][source]
academic_title: Column[str | None][source]
salutation: Column[str | None][source]
salutation_for_address: Column[str | None][source]
salutation_for_letter: Column[str | None][source]
forwarding_of_bills: Column[str | None][source]
phone_private: Column[str | None][source]
phone_mobile: Column[str | None][source]
phone_business: Column[str | None][source]
email_primary: Column[str | None][source]
email_secondary: Column[str | None][source]
website: Column[str | None][source]
remarks: Column[str | None][source]
picture[source]
roles: relationship[list[ParliamentarianRole]][source]
property active: bool[source]
commission_memberships: relationship[list[CommissionMembership]][source]
attendences: relationship[list[Attendence]][source]