activity.collections.attendee
Classes
Abstract base class for generic types. |
Module Contents
- class activity.collections.attendee.AttendeeCollection(session: sqlalchemy.orm.Session, **kwargs: Any)[source]
Bases:
onegov.core.collection.GenericCollection
[onegov.activity.models.Attendee
]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
- add(user: onegov.user.User, name: str, birth_date: datetime.date, gender: str | None, notes: str | None = None, differing_address: bool = False, address: str | None = None, zip_code: str | None = None, place: str | None = None, political_municipality: str | None = None) onegov.activity.models.Attendee [source]