activity.collections.volunteer

Classes

ReportRowWithVolunteer

VolunteerCollection

Abstract base class for generic types.

Module Contents

class activity.collections.volunteer.ReportRowWithVolunteer[source]

Bases: NamedTuple

activity_id: uuid.UUID[source]
activity_title: str[source]
activity_name: str[source]
need_id: uuid.UUID[source]
need_name: str[source]
min_required: int[source]
max_required: int[source]
confirmed: int[source]
occasion_id: uuid.UUID[source]
period_id: uuid.UUID[source]
occasion_number: int[source]
volunteer_id: uuid.UUID[source]
first_name: str[source]
last_name: str[source]
address: str[source]
zip_code: str[source]
place: str[source]
organisation: str | None[source]
birth_date: datetime.date[source]
age: int[source]
email: str[source]
phone: str[source]
state: onegov.activity.models.volunteer.VolunteerState[source]
dates: collections.abc.Sequence[datetime.datetime][source]
class activity.collections.volunteer.VolunteerCollection(session: sqlalchemy.orm.Session, period: Period | PeriodMeta | None)[source]

Bases: onegov.core.collection.GenericCollection[onegov.activity.models.Volunteer]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
period[source]
property model_class: type[onegov.activity.models.Volunteer][source]
property period_id: UUID | None[source]
report() Query[ReportRow][source]
for_period(period: Period | PeriodMeta | None) Self[source]