people.models.agency
Attributes
Classes
A general file (image, document, pdf, etc), referenced in the database. |
|
An agency (organization) containing people through memberships. |
Module Contents
- class people.models.agency.AgencyOrganigram[source]
Bases:
onegov.file.FileA general file (image, document, pdf, etc), referenced in the database.
Thanks to the use of Depot files can be seemingly stored in the database (with transaction guarantees), without actually storing it in the database.
- class people.models.agency.Agency(title: str, parent: Self | None = None, **kwargs: Any)[source]
Bases:
onegov.core.orm.abstract.AdjacencyList,onegov.core.orm.mixins.ContentMixin,onegov.core.orm.mixins.TimestampMixin,onegov.search.ORMSearchable,onegov.core.orm.mixins.UTCPublicationMixin,onegov.gis.CoordinatesMixinAn agency (organization) containing people through memberships.
- fts_type_title[source]
Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name.
- fts_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.
- property fts_last_change: None[source]
Returns the date the document was created/last modified.
Returning None indicates that the document’s age/recency must not influence search ranking: the item should be treated as equally relevant regardless of how old it is.
- memberships: sqlalchemy.orm.relationship[onegov.core.types.AppenderQuery[onegov.people.models.membership.AgencyMembership]][source]
- property organigram_file: depot.io.interfaces.StoredFile | None[source]
Returns the file-like content of the organigram.
- add_person(person_id: uuid.UUID, title: str, *, order_within_agency: int = 2**16, **kwargs: Any) onegov.people.models.membership.AgencyMembership[source]
Appends a person to the agency with the given title.