Volunteering system
The volunteering system allows us to manage volunteers at EMF. You can find more detail on these models are used in the volunteering app docs.
Volunteer
Roles
- class models.volunteer.role.Role(**kwargs)[source]
A role which a volunteer can perform.
- full_description_md: Mapped[str | None][source]
A longer description of the role, supports Markdown.
- instructions_url: Mapped[str | None][source]
A link to some instructions on how to perform the role.
Shifts
- class models.volunteer.shift.Shift(**kwargs)[source]
An available shift for one or more volunteers to perform.
- entries: Mapped[list[ShiftEntry]][source]
Entries (volunteers) for this shift
- classmethod generate_for(role, venue, first, final, min, max, base_duration=120, changeover=15)[source]
Build Shift records between start and end times.
- Return type:
list[Shift]
- Args:
first: an ISO8601 datetime indicating the start of the first shift
final: an ISO8601 datetime indicating the end of the last shift
min: is the minimum number of people needed to staff these shifts and still get the job done.
max: is the maximum number of people who can practically staff these shifts and having something to do.
base_duration: is how long we want a shift to be. The last shift of the day may be slightly shorter.
changeover: indicates the time in minutes to overlap two shifts, allowing some time for volunteers to handover between each other. Shifts will start changeover minutes before the configured start time.
- classmethod get_all_for_day(day)[source]
Return all shifts for the requested day.
- Return type:
Sequence[Self]
- is_clash(other)[source]
Calculate whether this shift clashes with another.
We use this to determine if we should allow a volunteer to sign up for both shifts, which is only permitted if the other shift is filling the same role in the same venue. In all other cases a volunteer can’t sign up for two shifts at the same time.
This is needed because contiguous shifts often have a slight overlap.
- occurrence: Mapped[Occurrence][source]
Optional Occurrence (talk/workshop) related to this shift
- venue: Mapped[VolunteerVenue][source]
Venue where the shift occurs