DayType¶
Qualified name: intranet.apps.schedule.models.DayType
- class intranet.apps.schedule.models.DayType(id, name, special)[source]¶
Bases:
Model- Parameters:
id (AutoField) – Primary key: ID
name (CharField) – Name
special (BooleanField) – Special
Relationship fields:
- Parameters:
codenames (
ManyToManyFieldtoCodeName) – Codenames (related name:daytype)blocks (
ManyToManyFieldtoBlock) – Blocks (related name:daytype)
Reverse relationships:
- Parameters:
day (Reverse
ForeignKeyfromDay) – All days of this day type (related name ofday_type)
Methods
Attributes
blocksType:
ManyToManyFieldtoBlockclass_namecodenamesType:
ManyToManyFieldtoCodeNameday_setType: Reverse
ForeignKeyfromDayReturns Time the school day ends.
idType:
AutoFieldnameType:
CharFieldReturns True if no blocks are scheduled.
objectsspecialType:
BooleanFieldReturns Time the school day begins.
- property end_time: Time¶
Returns Time the school day ends. Returns None if there are no blocks.
- Returns:
The Time at which the school day ends, or None if there are no blocks.