parliament.models.political_business
Attributes
Classes
Use this mixin if uploaded files can belong to any number of instances |
|
A participant of a political business, e.g. a parliamentarian. |
Module Contents
- type parliament.models.political_business.PoliticalBusinessType = Literal['inquiry', 'proposal', 'mandate', 'report', 'report and proposal', 'decision', 'message', 'urgent interpellation', 'invitation', 'interpelleation', 'commission report', 'communication', 'motion', 'postulate', 'resolution', 'regulation', 'miscellaneous', 'elections'][source]
- parliament.models.political_business.POLITICAL_BUSINESS_TYPE: dict[PoliticalBusinessType, str][source]
- parliament.models.political_business.POLITICAL_BUSINESS_STATUS: dict[PoliticalBusinessStatus, str][source]
- class parliament.models.political_business.PoliticalBusiness[source]
Bases:
onegov.core.orm.Base
,onegov.file.MultiAssociatedFiles
,onegov.core.orm.mixins.ContentMixin
,onegov.search.ORMSearchable
Use this mixin if uploaded files can belong to any number of instances
- es_public = True[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: str[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)
- class parliament.models.political_business.PoliticalBusinessParticipation[source]
Bases:
onegov.core.orm.Base
,onegov.core.orm.mixins.ContentMixin
A participant of a political business, e.g. a parliamentarian.
- political_business: sqlalchemy.orm.RelationshipProperty[PoliticalBusiness][source]