fsi.collections.attendee

Classes

CourseAttendeeCollection

Provides collections with pagination, if they implement a few

Module Contents

class fsi.collections.attendee.CourseAttendeeCollection(session: sqlalchemy.orm.Session, page: int = 0, exclude_external: bool = False, external_only: bool = False, auth_attendee: onegov.fsi.models.course_attendee.CourseAttendee | None = None, editors_only: bool = False, admins_only: bool = False)[source]

Bases: onegov.core.collection.GenericCollection[onegov.fsi.models.course_attendee.CourseAttendee], onegov.core.collection.Pagination[onegov.fsi.models.course_attendee.CourseAttendee]

Provides collections with pagination, if they implement a few documented properties and methods.

See onegov.ticket.TicketCollection for an example.

page = 0[source]
exclude_external = False[source]
external_only = False[source]
auth_attendee = None[source]
editors_only = False[source]
admins_only = False[source]
property unfiltered: bool[source]
property model_class: type[onegov.fsi.models.course_attendee.CourseAttendee][source]
__eq__(other: object) bool[source]

Returns True if the current and the other Pagination instance are equal. Used to find the current page in a list of pages.

property attendee_permissions: list[str][source]
query() sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.CourseAttendee][source]
subset() sqlalchemy.orm.Query[onegov.fsi.models.course_attendee.CourseAttendee][source]

Returns an SQLAlchemy query containing all records that should be considered for pagination.

property page_index: int[source]

Returns the current page index (starting at 0).

page_by_index(index: int) Self[source]

Returns the page at the given index. A page here means an instance of the class inheriting from the Pagination base class.

add_from_user(user: onegov.user.User) onegov.fsi.models.course_attendee.CourseAttendee[source]
by_id(id: uuid.UUID) onegov.fsi.models.course_attendee.CourseAttendee | None[source]