agency.models.agency

Module Contents

Classes

AgencyPdf

A PDF containing all data of an agency and its suborganizations.

ExtendedAgency

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

AgencyProxy

A proxy/alias for an agency.

class agency.models.agency.AgencyPdf[source]

Bases: onegov.file.File

A PDF containing all data of an agency and its suborganizations.

__mapper_args__[source]
class agency.models.agency.ExtendedAgency(title: str, parent: Self | None = None, **kwargs: Any)[source]

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

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

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.

property pdf_file: StoredFile | None[source]

Returns the PDF content for the agency (and all its suborganizations).

property portrait_html: str | None[source]

Returns the portrait that is saved as HTML from the redactor js plugin.

property location_address_html: markupsafe.Markup[source]
property postal_address_html: markupsafe.Markup[source]
property opening_hours_html: markupsafe.Markup[source]
__mapper_args__[source]
es_type_name = 'extended_agency'[source]
export_fields: onegov.core.orm.mixins.dict_property[list[str]][source]
pdf[source]
role_mappings: relationship[list[RoleMapping]][source]
trait = 'agency'[source]
proxy() AgencyProxy[source]

Returns a proxy object to this agency allowing alternative linking paths.

add_person(person_id: uuid.UUID, title: str, *, order_within_agency: int = 2**16, **kwargs: Any) onegov.agency.models.membership.ExtendedAgencyMembership[source]

Appends a person to the agency with the given title.

deletable(request: onegov.agency.request.AgencyRequest) bool[source]
class agency.models.agency.AgencyProxy(agency: onegov.people.Agency)[source]

A proxy/alias for an agency.

The agencies are routed as adjacency lists and the path is fully absorbed which prevents to add views such as /edit to be added directy.