CooldownPeriod¶
Qualified name: tin.apps.assignments.models.CooldownPeriod
- class CooldownPeriod(id, assignment, student, start_time)[source]¶
Bases:
Model
- Parameters:
id (BigAutoField) – Primary key: ID
start_time (DateTimeField) – Start time
Relationship fields:
- Parameters:
assignment (
ForeignKey
toAssignment
) – Assignment (related name:cooldown_periods
)student (
ForeignKey
toUser
) – Student (related name:cooldown_periods
)
Methods
exists
get_next_by_start_time
Finds next instance based on
start_time
.get_previous_by_start_time
Finds previous instance based on
start_time
.get_time_to_end
Attributes
assignment
Type:
ForeignKey
toAssignment
assignment_id
Internal field, use
assignment
instead.id
Type:
BigAutoField
objects
start_time
Type:
DateTimeField
student
Type:
ForeignKey
toUser
student_id
Internal field, use
student
instead.- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned