AKScheduling.models module

AKScheduling.models.update_constraint_violations(new_violations, existing_violations_to_check)[source]

Update existing constraint violations (subset for which new violations were computed) based on these new violations. This will add all new violations without a match, preserve the matching ones and delete the obsolete ones (those without a match from the newly calculated violations).

Parameters:
AKScheduling.models.update_cv_reso_deadline_for_slot(slot)[source]

Update constraint violation AK_AFTER_RESODEADLINE for given slot

Parameters:

slot (AKSlot) – slot to check/update

AKScheduling.models.check_capacity_for_slot(slot: AKSlot)[source]

Check whether this slot violates the capacity requirement

Parameters:

slot (AKSlot) – slot to check

Returns:

Violation (if any) or None

Return type:

ConstraintViolation or None

AKScheduling.models.ak_changed_handler(sender, instance: AK, **kwargs)[source]

Signal receiver: Check for violations after AK changed

Changes might affect: Reso intention, Category, Interest

AKScheduling.models.ak_owners_changed_handler(sender, instance: AK, action: str, **kwargs)[source]

Signal receiver: Owners of AK changed

AKScheduling.models.ak_conflicts_changed_handler(sender, instance: AK, action: str, **kwargs)[source]

Signal receiver: Conflicts of AK changed

AKScheduling.models.ak_prerequisites_changed_handler(sender, instance: AK, action: str, **kwargs)[source]

Signal receiver: Prerequisites of AK changed

AKScheduling.models.ak_requirements_changed_handler(sender, instance: AK, action: str, **kwargs)[source]

Signal receiver: Requirements of AK changed

AKScheduling.models.akslot_changed_handler(sender, instance: AKSlot, **kwargs)[source]

Signal receiver: AKSlot changed

Changes might affect: Duplicate parallel, Two in room, Resodeadline

AKScheduling.models.akslot_deleted_handler(sender, instance: AKSlot, **kwargs)[source]

Signal receiver: AKSlot deleted

Manually clean up or remove constraint violations that belong to this slot since there is no cascade deletion for many2many relationships. Explicitly listening for AK deletion signals is not necessary since they will transitively trigger this signal and we always set both AK and AKSlot references in a constraint violation

AKScheduling.models.room_changed_handler(sender, instance: Room, **kwargs)[source]

Signal receiver: Room changed

Changes might affect: Room size

AKScheduling.models.room_requirements_changed_handler(sender, instance: Room, action: str, **kwargs)[source]

Signal Receiver: Requirements of room changed

AKScheduling.models.availability_changed_handler(sender, instance: Availability, **kwargs)[source]

Signal receiver: Availalability changed

Changes might affect: category availability, AK availability, Room availability

AKScheduling.models.event_changed_handler(sender, instance: Event, **kwargs)[source]

Signal receiver: Event changed

Changes might affect: Reso deadline