pas.models.parliamentarian

Classes

PASParliamentarian

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

Module Contents

class pas.models.parliamentarian.PASParliamentarian[source]

Bases: onegov.parliament.models.Parliamentarian, 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).

__mapper_args__[source]
fts_type_title[source]
fts_public = False[source]
fts_title_property = 'title'[source]
fts_properties[source]
property fts_suggestion: tuple[str, Ellipsis][source]
attendences: sqlalchemy.orm.relationship[list[onegov.pas.models.Attendence]][source]
user: sqlalchemy.orm.relationship[onegov.user.User][source]
roles: sqlalchemy.orm.relationship[list[onegov.pas.models.parliamentarian_role.PASParliamentarianRole]][source]
get_party_during_period(start_date: datetime.date, end_date: datetime.date, session: sqlalchemy.orm.Session) onegov.pas.models.Party | None[source]

Get the party this parliamentarian belonged to during a specific period.

Note: If you find yourself calling this in a loop, it’s not

recommended. Pre-fetch PASParliamentarianRole first.