AKScheduling.api module

class AKScheduling.api.ResourceSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

REST Framework Serializer for Rooms to produce format required for fullcalendar resources

static transform_title(obj)[source]

Adapt title, add capacity information if room has a restriction (capacity is not -1)

class AKScheduling.api.ResourcesViewSet(**kwargs)[source]

Bases: EventSlugMixin, ListModelMixin, GenericViewSet

API View: Rooms (resources to schedule for in fullcalendar)

Read-only, adaption to fullcalendar format through ResourceSerializer

serializer_class

alias of ResourceSerializer

class AKScheduling.api.EventsView(**kwargs)[source]

Bases: LoginRequiredMixin, EventSlugMixin, ListView

API View: Slots (events to schedule in fullcalendar)

Read-only, JSON formatted response is created manually since it requires a bunch of “custom” fields that have different names compared to the normal model or are not present at all and need to be computed to create the required format for fullcalendar.

model

alias of AKSlot

class AKScheduling.api.RoomAvailabilitiesView(**kwargs)[source]

Bases: LoginRequiredMixin, EventSlugMixin, ListView

API view: Availabilities of rooms

Read-only, JSON formatted response is created manually since it requires a bunch of “custom” fields that have different names compared to the normal model or are not present at all and need to be computed to create the required format for fullcalendar.

model

alias of Availability

class AKScheduling.api.DefaultSlotsView(**kwargs)[source]

Bases: LoginRequiredMixin, EventSlugMixin, ListView

API view: default slots

Read-only, JSON formatted response is created manually since it requires a bunch of “custom” fields that have different names compared to the normal model or are not present at all and need to be computed to create the required format for fullcalendar.

model

alias of DefaultSlot

class AKScheduling.api.EventSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

REST framework serializer to adapt between AKSlot model and the event format of fullcalendar

class AKScheduling.api.EventsViewSet(**kwargs)[source]

Bases: EventSlugMixin, UpdateModelMixin, GenericViewSet

API view: Update scheduling of a slot (event in fullcalendar format)

Write-only (will however reply with written values to PUT request)

serializer_class

alias of EventSerializer

class AKScheduling.api.ConstraintViolationSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

REST Framework Serializer for constraint violations

class AKScheduling.api.ConstraintViolationsViewSet(**kwargs)[source]

Bases: EventSlugMixin, ListModelMixin, GenericViewSet

API View: Constraint Violations of an event

Read-only, fields and model selected in ConstraintViolationSerializer

serializer_class

alias of ConstraintViolationSerializer