people.collections.memberships
Classes
Manages a list of agency memberships.  | 
Module Contents
- class people.collections.memberships.AgencyMembershipCollection(session: sqlalchemy.orm.Session, **kwargs: Any)[source]
 Bases:
onegov.core.collection.GenericCollection[onegov.people.models.AgencyMembership]Manages a list of agency memberships.
Use it like this:
from onegov.people import AgencyMembershipCollection memberships = AgencyMembershipCollection(session)
- query(order_by: str | None = None) sqlalchemy.orm.Query[onegov.people.models.AgencyMembership][source]
 
- move(subject: onegov.people.models.AgencyMembership, target: onegov.people.models.AgencyMembership, direction: onegov.core.orm.abstract.MoveDirection, move_on_col: Literal['order_within_person', 'order_within_agency']) None[source]
 Takes the given subject and moves it somewhere in relation to the target.
- Subject:
 The item to be moved.
- Target:
 The item above which or below which the subject is moved.
- Direction:
 The direction relative to the target. Either
MoveDirection.aboveif the subject should be moved above the target, orMoveDirection.belowif the subject should be moved below the target.- Move_on_col:
 Designates the column for which the new order should be evaluated. Possible values are order_within_agency and order_within_person.