EighthRoom

Qualified name: intranet.apps.eighth.models.EighthRoom

class intranet.apps.eighth.models.EighthRoom(*args, **kwargs)[source]

Bases: AbstractBaseEighthModel

Represents a room in which an eighth period activity can be held. .. attribute:: name

The name of the room.

type:

str

capacity

The maximum capacity of the room (-1 for unlimited, 0 to prevent student signup)

Type:

int

available_for_eighth

Whether the room is available for eighth period signups.

Type:

bool

Parameters:

Reverse relationships:

Parameters:

Methods

save_without_historical_record

Save model without saving a historical record

total_capacity_of_rooms

Returns the total capacity of the provided rooms.

Attributes

available_for_eighth

Type: BooleanField

capacity

Type: SmallIntegerField

eighthactivity_set

Type: Reverse ManyToManyField from EighthActivity

eighthscheduledactivity_set

Type: Reverse ManyToManyField from EighthScheduledActivity

formatted_name

The formatted name of the room.

history

id

Type: AutoField

name

Type: CharField

objects

to_be_determined

Whether the Room needs to be assigned.

unique_together

property formatted_name: str

The formatted name of the room. If it looks like the room is a numbered room – the name starts with either a number or with the text “Room” – returns “Rm. <room number>.” :returns: The formatted name of the Room.

save_without_historical_record(*args, **kwargs)

Save model without saving a historical record

Make sure you know what you’re doing before you use this method.

property to_be_determined: bool

Whether the Room needs to be assigned.

static total_capacity_of_rooms(rooms: Iterable[EighthRoom]) int[source]

Returns the total capacity of the provided rooms. :param rooms: Rooms to determine total capacity for.

Returns:

The total capacity of the provided rooms.