intranet.apps.eighth package

Subpackages

Submodules

intranet.apps.eighth.admin module

class intranet.apps.eighth.admin.EighthActivityAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

list_display = ('name', 'special', 'administrative', 'deleted')
list_filter = ('special', 'administrative', 'deleted')
ordering = ('name',)
class intranet.apps.eighth.admin.EighthBlockAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

list_display = ('date', 'block_letter', 'comments', 'signup_time', 'locked')
list_filter = ('locked',)
ordering = ('date', 'block_letter')
class intranet.apps.eighth.admin.EighthRoomAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

list_display = ('name', 'capacity')
ordering = ('name',)
class intranet.apps.eighth.admin.EighthScheduledActivityAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

list_display = ('activity', 'block', 'comments', 'admin_comments', 'cancelled')
list_filter = ('block', 'cancelled')
ordering = ('block', 'activity')
class intranet.apps.eighth.admin.EighthSignupAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

get_activity(obj)[source]
get_block(obj)[source]
list_display = ('user', 'get_activity', 'get_block', 'after_deadline', 'was_absent')
list_filter = ('scheduled_activity__block',)
ordering = ('scheduled_activity', 'user')
raw_id_fields = ('user', 'scheduled_activity')
class intranet.apps.eighth.admin.EighthSponsorAdmin(model, admin_site)[source]

Bases: simple_history.admin.SimpleHistoryAdmin

list_display = ('first_name', 'last_name', 'user', 'online_attendance', 'show_full_name')
list_filter = ('online_attendance', 'show_full_name')
ordering = ('last_name', 'first_name')

intranet.apps.eighth.context_processors module

intranet.apps.eighth.context_processors.absence_count(request)[source]

Add the absence count to the context for students.

Parameters

request – The request object

Returns

Number of absences that a student has if a student, an empty dictionary otherwise.

intranet.apps.eighth.context_processors.enable_waitlist(request)[source]

Add whether the waitlist is enabled to the context.

Parameters

request – The request object

Returns

Whether the waitlist is enabled.

Return type

bool

intranet.apps.eighth.context_processors.start_date(request)[source]

Add the start date to the context for eighth admins.

Parameters

request – The request object

Returns

The start date if an eighth_admin, an empty dictionary otherwise.

intranet.apps.eighth.exceptions module

exception intranet.apps.eighth.exceptions.SignupException[source]

Bases: Exception

as_response(html=True, admin=False)[source]
messages(admin=False)[source]
intranet.apps.eighth.exceptions.m

alias of intranet.apps.eighth.exceptions.Message

intranet.apps.eighth.models module

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

Bases: django.db.models.base.Model

Abstract base model that includes created and last modified times.

created_time

The time the model was created

Type

datetime

last_modified_time

The time the model was last modified.

Type

datetime

class Meta[source]

Bases: object

abstract = False
created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

Represents an eighth period activity.

name

The name of the activity, max length 100 characters.

Type

str

description

The description of the activity, shown on the signup page below the other information. Information on an EighthScheduledActivity basis can be found in the “comments” field of that model. Max length 2000 characters.

Type

str

sponsors

The default activity-level sponsors for the activity. On an EighthScheduledActivity basis, you should NOT query this field. Instead, use scheduled_activity.get_true_sponsors()

Type

list of EighthSponsor

rooms

The default activity-level rooms for the activity. On an EighthScheduledActivity basis, you should NOT query this field. Use scheduled_activity.get_true_rooms()

Type

list of EighthRoom

default_capacity

The default capacity, which overrides the sum of the default rooms when scheduling the activity. By default, this has a null value and is ignored.

Type

int

presign

If True, the activity can only be signed up for within 48 hours of the day that the activity is scheduled.

Type

bool

one_a_day

If True, a student can only sign up for one instance of this activity per day.

Type

bool

both_blocks

If True, a signup for an EighthScheduledActivity during an A or B block will enforce and automatically trigger a signup on the other block. Does not enforce signups for blocks other than A and B.

Type

bool

sticky

If True, then students who sign up or are placed in this activity cannot switch out of it. A sticky activity should also be restricted, unless you’re mean.

Type

bool

special

If True, then the activity receives a special designation on the signup list, and is stuck to the top of the list.

Type

bool

administrative

If True, then students cannot see the activity in their signup list. However, the activity still exists in the system and can be seen by administrators. Students can still sign up for the activity through the API – this does not prevent students from signing up for it, and just merely hides it from view. An administrative activity should be restricted.

Type

bool

finance

The account name of the club with the Finance Office. If blank or null, there is no account.

Type

str

restricted

Whether the signups for the activity are restricted to certain users/groups or if there are blacklisted users.

Type

str

users_allowed

Individual users allowed to sign up for this activity. Extensive use of this is discouraged; make a group instead through the “Add and Assign Empty Group” button on the Edit Activity page. Only takes effect if the activity is restricted.

Type

list of User

groups_allowed

Individual groups allowed to sign up for this activity. Only takes effect if the activity is restricted.

Type

list of Group

users_blacklisted

Individual users who are not allowed to sign up for this activity. Only takes effect if the activity is not restricted.

Type

list of User

freshman_allowed

Whether freshmen are allowed to sign up for this activity. Only takes effect if the activity is restricted.

Type

bool

sophomores_allowed

Whether sophomores are allowed to sign up for this activity. Only takes effect if the activity is restricted.

Type

bool

juniors_allowed

Whether juniors are allowed to sign up for this activity. Only takes effect if the activity is restricted.

Type

bool

seniors_allowed

Whether seniors are allowed to sign up for this activity. Only takes effect if the activity is restricted.

Type

bool

wed_a

Whether the activity generally meets on Wednesday A blocks. Does not affect schedule, is just information for the Eighth Office.

Type

bool

wed_b

Whether the activity generally meets on Wednesday B blocks. Does not affect schedule, is just information for the Eighth Office.

Type

bool

fri_a

Whether the activity generally meets on Friday A blocks. Does not affect schedule, is just information for the Eighth Office.

Type

bool

fri_b

Whether the activity generally meets on Friday B blocks. Does not affect schedule, is just information for the Eighth Office.

Type

bool

admin_comments

Notes for the Eighth Office.

Type

str

favorites

A ManyToManyField of User objects who have favorited the activity.

Type

list of User

similarities

A ManyToManyField of EighthActivitySimilarity objects which are similar to this activity.

Type

list of EighthActivitySimilarity

deleted

Whether the activity still technically exists in the system, but was marked to be deleted.

Type

bool

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

admin_comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

administrative

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property aid

The publicly visible activity ID.

Returns

The public activity ID.

classmethod available_ids() → List[int][source]

Returns all available IDs not used by an EighthActivity.

Returns

A list of the available activity IDs.

both_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity()int[source]

Returns ‘default_capacity’ if it is set. Otherwise, returns the total capacity of all the activity’s rooms.

Returns

The activity’s capacity.

default_capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deleted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthblock_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthscheduledactivity_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

favorites

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

finance

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property frequent_users

Return a QuerySet of user id’s and counts that have signed up for this activity more than settings.SIMILAR_THRESHOLD times.

This is used for suggesting activities to users.

Returns

A QuerySet of users who attend this activity frequently.

freshmen_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

fri_a

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

fri_b

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_active_schedulings() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthScheduledActivity]][source]

Returns all EighthScheduledActivitys scheduled this year for this activity.

Returns

EighthScheduledActivitys of this activity occurring this year.

groups_allowed

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property is_active

Returns whether an activity is “active.” An activity is considered to be active if it has been scheduled at all this year.

Returns:

Whether the activity is active.

Returns whether this activity has more than settings.SIMILAR_THRESHOLD * 2 frequent_users.

Returns

Whether this activity has more than settings.SIMILAR_THRESHOLD * 2 frequent_users.

juniors_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property name_with_flags

Return the activity name with special, both blocks, restricted, administrative, sticky, and deleted flags.

Returns

The activity name with all flags.

property name_with_flags_no_restricted

Returns the activity’s name with flags. These flags indicate whether the activity is special, both blocks, administrative, sticky, and/or cancelled.

Returns:

The activity name with all flags except the “restricted” flag.

objects = <django.db.models.manager.Manager object>
one_a_day

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

presign

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

restricted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod restricted_activities_available_to_user(user: intranet.apps.users.models.User) → List[int][source]

Finds the restricted activities available to the given user.

Parameters

user – The User to find the restricted activities for.

Returns

The restricted activities available to the user.

rooms

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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.

seniors_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

similarities

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sophomores_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

special

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sponsors

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sticky

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

undeleted_objects = <intranet.apps.eighth.models.EighthActivityExcludeDeletedManager object>
users_allowed

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

users_blacklisted

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

wed_a

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

wed_b

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthActivityExcludeDeletedManager[source]

Bases: django.db.models.manager.Manager

get_queryset()[source]
class intranet.apps.eighth.models.EighthActivitySimilarity(id, created_time, last_modified_time, count, weighted)[source]

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

activity_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
update_weighted()[source]

Recalculates the ‘weighted’ field based on changes to similar activities.

weighted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthActivity_favorites(id, eighthactivity, user)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthActivity_groups_allowed(id, eighthactivity, group)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

group

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

group_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthActivity_rooms(id, eighthactivity, eighthroom)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthroom

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthroom_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthActivity_similarities(id, eighthactivity, eighthactivitysimilarity)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthactivitysimilarity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivitysimilarity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthActivity_sponsors(id, eighthactivity, eighthsponsor)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthsponsor

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthsponsor_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthActivity_users_allowed(id, eighthactivity, user)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthActivity_users_blacklisted(id, eighthactivity, user)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

Represents an eighth period block.

date

The date of the block.

signup_time

The recommended time at which all users should sign up. This does not prevent people from signing up at this time, however students will see the amount of time left to sign up. Defaults to 12:40.

block_letter

The block letter (e.g. A, B, A1, A2, SOL). Despite its name, it can now be more than just a letter.

locked

Whether signups are closed.

activities

List of EighthScheduledActivitys for the block.

override_blocks

List of EighthBlocks that the block overrides.

This allows the half-blocks used during Techlab visits to be easily managed. If a student should only be allowed to sign up for either only block A or both blocks A1 and A2, then block A would override blocks A1 and A2, and blocks A1 and A2 would override block A.

comments

A short comments field displayed next to the block letter.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

activities

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

attendance_locked()bool[source]

Returns whether the block’s attendance is locked.

If the block’s attendance is locked, non-eighth admins cannot change attendance.

Returns

Whether the block’s attendance is locked.

block_letter

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date_in_past()bool[source]

Returns whether the block has already happened.

Returns

Whether the block’s date is in the past.

eighthblock_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthscheduledactivity_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthwaitlist_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property formatted_date

Returns the block date, formatted according to settings.EIGHTH_BLOCK_DATE_FORMAT.

Returns

The formatted block date.

get_hidden_signups() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthSignup]][source]

Returns a QuerySet of EighthSignups whose users are not students but have signed up for an activity.

This is usually a list of signups for the z-Withdrawn from TJ activity.

Returns

A QuerySet of users who are not current students but have signed up for an activity this block.

get_next_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)
get_unsigned_students() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]

Return a QuerySet of people who haven’t signed up for an activity during this block.

Returns

The users who have not signed up for an activity during this block.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

in_clear_absence_period()bool[source]

Returns whether today’s date is within the block’s clear absence period. This determines whether the option to clear an eighth period absence should be shown. If the block is not within the clear absence period, an absence cannot be cleared.

Returns

Whether the current date is in the block’s clear absence period.

property is_this_year

Return whether the block occurs during this school year.

Returns

Whether the block occurs during this school year.

is_today()bool[source]

Returns whether the block occurs today.

Returns

Whether the block occurs today.

property letter_width

Returns the width in pixels that should be allocated for the block_letter on the signup page.

Returns

The width in pixels of the block letter.

locked

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_blocks(quantity: int = - 1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets future blocks this school year in order.

Parameters

quantity – The number of blocks to list after this block, or -1 for all following blocks.

Returns

A QuerySet with the specified number of future blocks this school year. If quantity is passed, then the QuerySet will not be filter()-able.

num_no_signups()int[source]

Gets how many people have not signed up for an activity this block.

Returns

The number of people who have not signed up for an activity during this block.

num_signups()int[source]

Gets how many people have signed up for an activity this block.

Returns

The number of people who have signed up for an activity during this block.

objects = <intranet.apps.eighth.models.EighthBlockManager object>
override_blocks

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

previous_blocks(quantity: int = - 1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets the previous blocks this school year in order.

Parameters

quantity – The number of blocks to list before this block, or -1 for all previous blocks.

Returns

If quantity is not passed, retuns a QuerySet with all the blocks this school year before this block.

If quantity is passed, returns a list with the specified number of blocks this school year before this block.

save(*args, **kwargs)[source]

Capitalize the first letter of the block name.

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 short_text

Returns the date and block letter for this block.

It is returned in the format of MM/DD B, like “9/1 B”

Returns

The date and block letter.

signup_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

signup_time_future()bool[source]

Returns whether the block closes in the future.

Returns

Whether the block’s signup time is in the future.

class intranet.apps.eighth.models.EighthBlockManager[source]

Bases: django.db.models.manager.Manager

get_blocks_this_year() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets a QuerySet of blocks that occur this school year.

Returns

A QuerySet of all the blocks that occur during this school year.

get_blocks_today() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets a QuerySet of blocks that occur today.

Returns

A QuerySet of all the blocks that occur today.

get_first_upcoming_block()intranet.apps.eighth.models.EighthBlock[source]

Gets the first upcoming block (the first block that will take place in the future).

Returns

The first upcoming EighthBlock object, or None if there are none upcoming.

get_next_upcoming_blocks() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets the next upccoming blocks.

It finds the other blocks that are occurring on the day of the first upcoming block.

Returns

A QuerySet of the next upcoming EighthBlock objects.

get_queryset()[source]
get_upcoming_blocks(max_number: int = - 1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets the given number of upcoming blocks that will take place in the future.

If there is no block in the future, the most recent block will be returned.

Returns

A QuerySet of the X upcoming EighthBlock objects.

class intranet.apps.eighth.models.EighthBlockQuerySet(model=None, query=None, using=None, hints=None)[source]

Bases: django.db.models.query.QuerySet

filter_today() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Gets EighthBlocks that occur today.

Returns

A QuerySet containing all of the blocks selected by this QuerySet that occur today.

this_year() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]

Get EighthBlocks from this school year only.

Returns

A QuerySet containing all of the blocks selected by this QuerySet that occur during this school year.

class intranet.apps.eighth.models.EighthBlock_override_blocks(id, from_eighthblock, to_eighthblock)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

from_eighthblock

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

from_eighthblock_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
to_eighthblock

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

to_eighthblock_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

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

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

Whehther the room is available for eighth period signups.

Type

bool

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

available_for_eighth

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthactivity_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthscheduledactivity_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property formatted_name

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.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
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

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.

Parameters

rooms – Rooms to determine total capacity for.

Returns

The total capacity of the provided rooms.

unique_together = (('name', 'capacity'),)
class intranet.apps.eighth.models.EighthScheduledActivity(*args, **kwargs)[source]

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

Represents the relationship between an activity and a block in which it has been scheduled.

block

EighthBlock The EighthBlock during which an EighthActivity has been scheduled

activity

The scheduled EighthActivity

members

The Users who have signed up for an EighthBlock

both_blocks

If True, a signup for an EighthScheduledActivity during an A or B block will enforce and automatically trigger a signup on the other block. Does not enforce signups for blocks other than A and B.

comments

Notes for students

admin_comments

Notes for the Eighth Office

sponsors

EighthSponsors that will override the EighthActivity’s default sponsors

rooms

EighthRooms that will override the EighthActivity’s default rooms

attendance_taken

Whether the EighthSponsor for the scheduled EighthActivity has taken attendance yet

special

Whether this scheduled instance of the activity is special. If not set, falls back on the EighthActivity’s special setting.

cancelled

whether the EighthScheduledActivity has been cancelled

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

activity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

activity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

add_user(user: intranet.apps.users.models.User, request: Optional[django.http.request.HttpRequest] = None, force: bool = False, no_after_deadline: bool = False, add_to_waitlist: bool = False)[source]

Signs up a user to this scheduled activity if possible. This is where the magic happens.

Raises an exception if there’s a problem signing the user up unless the signup is forced and the requesting user has permission.

Parameters
  • user – The user to add to the scheduled activity.

  • request – The request object associated with the signup action. Should always be passed if applicable, as some information is extracted from the request.

  • force – Whether to force the signup.

  • no_after_deadline – Whether to mark the user as not having signed up after the deadline, regardless of whether they did or not.

  • add_to_waitlist – Explicitly add the user to the waitlist.

admin_comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

administrative

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

archived_member_count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

attendance_taken

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

block

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

block_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

both_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cancel()[source]

Cancel an EighthScheduledActivity and send a notification email to signed-up students. This method should be always be called instead of setting the ‘cancelled’ flag manually. (Note: To avoid spamming students signed up for both-block activities, an email is not sent for the B-block activity in both-block activities.)

cancelled

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthsignup_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthwaitlist_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

event_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property full_title

Gets the full title for the activity, appending the title of the scheduled activity to the activity’s name.

Returns

The full title for the scheduled activity, without flags.

get_administrative()bool[source]

Returns whether this scheduled activity is administrative.

Returns

Whether this activity is administrative

get_all_associated_rooms() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthRoom]][source]

Returns a QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity.

Returns

A QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity.

get_both_blocks_sibling() → Optional[intranet.apps.eighth.models.EighthScheduledActivity][source]

If this is a both-blocks activity, get the other EighthScheduledActivity object that occurs on the other block.

both_blocks means A and B block, NOT all of the blocks on that day.

Returns

EighthScheduledActivity object if found. None, if the activity cannot have a sibling.

get_finance()str[source]

Retrieves the name of this activity’s account with the finance office, if any.

Returns

The name of this activity’s account with the finance office.

get_hidden_members(user: Optional[intranet.apps.users.models.User] = None) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]

Returns a QuerySet of the members that you do not have permission to view.

Parameters

user – The user who is attempting to view the member list.

Returns

Unsorted QuerySet of the members that you do not have permission to view.

get_restricted()bool[source]

Gets whether this scheduled activity is restricted.

Returns

Whether this scheduled activity is restricted.

get_special()bool[source]

Returns whether this scheduled activity is special.

Returns

Whether this scheduled activity is special.

get_sticky()bool[source]

Gets whether this scheduled activity is sticky.

Returns

Whether this scheduled activity is sticky.

get_true_capacity()int[source]

Retrieves the capacity for the scheduled activity, taking into account activity defaults and overrides.

Returns

The true capacity of the scheduled activity.

get_true_rooms() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthRoom]][source]

Retrieves the rooms for the scheduled activity, taking into account activity defaults and overrides.

Returns

The true room list of the scheduled activity.

get_true_sponsors() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthSponsor]][source]

Retrieves the sponsors for the scheduled activity, taking into account activity defaults and overrides.

Returns

The sponsors for this scheduled activity.

get_viewable_members(user: Optional[intranet.apps.users.models.User] = None) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]

Returns a QuerySet of the members that you have permission to view, sorted alphabetically.

Parameters

user – The user who is attempting to view the member list.

Returns

QuerySet of the members that you have permission to view, sorted alphabetically.

get_viewable_members_serializer(request) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]

Given a request, returns an unsorted QuerySet of the members that the requesting user has permission to view.

Parameters

request – The request object associated with the member list query.

Returns

Unsorted QuerySet of the members that you have permssion to view.

has_open_passes()bool[source]

Returns whether there are passes that have not been acknowledged.

Returns

Whether this activity has open passes.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_almost_full()bool[source]

Returns whether the scheduled activity is almost full (>=90%).

Returns

Whether this scheduled activity is at least 90% full.

is_both_blocks()bool[source]

Gets whether this scheduled activity runs both blocks.

Returns

Whether this scheduled activity runs both blocks.

is_full(nocache: bool = False)bool[source]

Returns whether the scheduled activity is full.

Parameters

nocache – Whether to disable caching for the query that checks the scheduled activity’s current capacity.

Returns

Whether this scheduled activity is full.

is_overbooked()bool[source]

Returns whether the activity is overbooked (>100%) capacity.

Returns

Whether this scheduled activity is overbooked.

is_too_early_to_signup(now: Optional[datetime.datetime] = None)bool[source]

Returns whether it is too early to sign up for the activity if it is a presign.

This contains the 48 hour presign logic.

Parameters

now – A datetime object to use for the check instead of the current time.

Returns

Whether it is too early to sign up for this scheduled activity.

members

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

notify_waitlist(waitlists: Iterable[EighthWaitlist])[source]

Notifies all users on the given EighthWaitlist objects that the activity they are on the waitlist for has an open spot.

Parameters

waitlists – The EighthWaitlist objects whose users should be notified that the activity has an open slot.

objects = <intranet.apps.eighth.models.EighthScheduledActivityManager object>
restricted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

rooms

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

save(*args, **kwargs)[source]
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.

special

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sponsors

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sticky

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property title_with_flags

Gets the title for the activity, appending the title of the scheduled activity to the activity’s name and flags.

Returns

The full title for the scheduled activity, with flags.

uncancel()[source]

Uncancel an EighthScheduledActivity.

This does nothing besides unset the cancelled flag and save the object.

user_is_sponsor(user: intranet.apps.users.models.User)bool[source]

Returns whether the given user is a sponsor of the activity.

Parameters

user – The user to check for sponsorship of this activity.

Returns

Whether the given user is a sponsor of the activity.

waitlist

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class intranet.apps.eighth.models.EighthScheduledActivityManager[source]

Bases: django.db.models.manager.Manager

Model Manager for EighthScheduledActivity.

for_sponsor(sponsor: intranet.apps.eighth.models.EighthSponsor, include_cancelled: bool = False) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthScheduledActivity]][source]

Returns a QuerySet of EighthScheduledActivities where the given EighthSponsor is sponsoring.

If a sponsorship is defined in an EighthActivity, it may be overridden on a block by block basis in an EighthScheduledActivity. Sponsors from the EighthActivity do not carry over.

EighthScheduledActivities that are deleted or cancelled are also not counted.

Parameters
  • sponsor – The sponsor to search for.

  • include_cancelled – Whether to include cancelled activities. Deleted activities are always excluded.

Returns

A QuerySet of EighthScheduledActivities where the given EighthSponsor

is sponsoring.

class intranet.apps.eighth.models.EighthScheduledActivity_rooms(id, eighthscheduledactivity, eighthroom)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthroom

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthroom_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthscheduledactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthscheduledactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthScheduledActivity_sponsors(id, eighthscheduledactivity, eighthsponsor)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

eighthscheduledactivity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthscheduledactivity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthsponsor

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

eighthsponsor_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.eighth.models.EighthSignup(*args, **kwargs)[source]

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

Represents a signup/membership in an eighth period activity.

user

The User who has signed up.

scheduled_activity

The EighthScheduledActivity for which the user has signed up.

after_deadline

Whether the signup was after deadline.

previous_activity_name

The name of the activity the student was previously signed up for (used for passes)

previous_activity_sponsors

The sponsors of the activity the student was previously signed up for.

pass_accepted

Whether the pass was accepted

was_absent

Whether the student was absent.

absence_acknowledged

Whether the student has dismissed the absence notification.

absence_emailed

Whether the student has been emailed about the absence.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

absence_acknowledged

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

absence_emailed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

accept_pass()[source]

Accepts an eighth period pass for the EighthSignup object.

after_deadline

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

archive_remove_absence()[source]

If user was absent, archives the absence.

archived_was_absent

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)
has_conflict(nocache: bool = False)bool[source]

Returns True if another EighthSignup object exists for the same user in the same block.

Parameters

nocache – Whether to explicitly disable caching for this check.

Returns

Whether there is another EighthSignup for the same user in the same block.

history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

in_clear_absence_period()bool[source]

Returns whether the block for this signup is in the clear absence period.

Returns

Whether the block for this signup is in the clear absence period.

objects = <intranet.apps.eighth.models.EighthSignupManager object>
own_signup

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

pass_accepted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

previous_activity_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

previous_activity_sponsors

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

reject_pass()[source]

Rejects an eighth period pass for the EighthSignup object.

remove_signup(user: Optional[intranet.apps.users.models.User] = None, force: bool = False, dont_run_waitlist: bool = False)str[source]

Attempts to remove the EighthSignup if the user has permission to do so.

Parameters
  • user – The user who is attempting to remove the EighthSignup.

  • force – Whether to force removal.

  • dont_run_waitlist – Whether to skip notifying users on the activity’s waitlist.

Returns

A message to be displayed to the user indicating successful removal.

save(*args, **kwargs)[source]
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.

scheduled_activity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

scheduled_activity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

validate_unique(*args, **kwargs)[source]

Checked whether more than one EighthSignup exists for a User on a given EighthBlock.

was_absent

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthSignupManager[source]

Bases: django.db.models.manager.Manager

Model manager for EighthSignup.

create_signup(user: intranet.apps.users.models.User, scheduled_activity: intranet.apps.eighth.models.EighthScheduledActivity, **kwargs)intranet.apps.eighth.models.EighthSignup[source]

Creates an EighthSignup for the given user in the given activity after checking for duplicate signups.

This raises an error if there are duplicate signups.

Parameters
  • user – The user to create the EighthSignup for.

  • scheduled_activity – The EighthScheduledActivity to sign the user up for.

get_absences() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthSignup]][source]

Returns all EighthSignups for which the student was marked as absent.

Returns

A QuerySet of all the EighthSignups for which the student was marked as absent.

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

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

Represents a sponsor for an eighth period activity.

A sponsor could be linked to an actual user or just a name.

first_name

The first name of the sponsor.

Type

str

last_name

The last name of the sponsor.

Type

str

user

A users.User object linked to the sponsor.

Type

User

department

The sponsor’s department.

Type

str

full_time

Whether the sponsor is full-time.

Type

bool

online_attendance

Whether the sponsor takes. attendance online.

Type

bool

contracted_eighth

Whether the sponsor is contracted to supervise 8th periods.

Type

bool

show_full_name

Whether to always show the sponsor’s full name (e.x. because there are two teachers named Lewis).

Type

bool

DEPARTMENTS = (('general', 'General'), ('math_cs', 'Math/CS'), ('english', 'English'), ('social_studies', 'Social Studies'), ('fine_arts', 'Fine Arts'), ('health_pe', 'Health/PE'), ('scitech', 'Science/Technology'))
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

contracted_eighth

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

department

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

eighthactivity_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

eighthscheduledactivity_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

first_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

full_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_department_display(*, field=<django.db.models.fields.CharField: department>)
history = <simple_history.manager.HistoryManager object>
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property name

If show_full_name is set, returns “last name, first name”. Otherwise, returns last name only.

Returns

The name to display for the sponsor, omitting the first name unless explicitly requested.

objects = <django.db.models.manager.Manager object>
online_attendance

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.

show_full_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property to_be_assigned

Returns True if the sponsor’s name contains “to be assigned” or similar.

Returns

Whether the sponsor is a “to be assigned” sponsor.

user

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthWaitlist(id, created_time, last_modified_time, time, user, block, scheduled_activity)[source]

Bases: intranet.apps.eighth.models.AbstractBaseEighthModel

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

block

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

block_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <intranet.apps.eighth.models.EighthWaitlistManager object>
scheduled_activity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

scheduled_activity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.models.EighthWaitlistManager[source]

Bases: django.db.models.manager.Manager

Model manager for EighthWaitlist.

check_for_prescence(activity: intranet.apps.eighth.models.EighthScheduledActivity, user: intranet.apps.users.models.User)bool[source]

Returns whether the given user is in a waitlist for the given activity.

Parameters
  • activity – The activity for which the waitlist should be queried.

  • user – The user who should be searched for in the activity’s waitlist.

Returns

Whether the given user is in a waitlist for the given activity.

get_next_waitlist(activity: intranet.apps.eighth.models.EighthScheduledActivity) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthWaitlist]][source]

Returns a QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time.

Parameters

activity – The activity to list the EighthWaitlist objects for.

Returns

A QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time.

position_in_waitlist(aid: int, uid: int)int[source]

Given an activity ID and a user ID, returns the user’s position in the waitlist (starting at 1). If the user is not in the waitlist, returns 0.

Parameters
  • aid – The ID of the EighthScheduledActivity for which the waitlist should be queried.

  • uid – The ID of the user whose position in the waitlist should be found.

Returns

The user’s position in the waitlist, starting at 1, or 0 if the user is not in the waitlist.

intranet.apps.eighth.notifications module

intranet.apps.eighth.notifications.absence_email(signup, use_celery=True)[source]
intranet.apps.eighth.notifications.activity_cancelled_email(sched_act: intranet.apps.eighth.models.EighthScheduledActivity)[source]

Notifies all the users signed up for the given EighthScheduledActivity that it has been cancelled.

Parameters

sched_act – The activity that has been cancelled.

intranet.apps.eighth.notifications.signup_status_email(user, next_blocks, use_celery=True)[source]

intranet.apps.eighth.serializers module

class intranet.apps.eighth.serializers.EighthActivityDetailSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'administrative', 'restricted', 'presign', 'one_a_day', 'both_blocks', 'sticky', 'special', 'scheduled_on')
model

alias of intranet.apps.eighth.models.EighthActivity

fetch_scheduled_on(act)[source]
class intranet.apps.eighth.serializers.EighthActivityListSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'url', 'name')
model

alias of intranet.apps.eighth.models.EighthActivity

class intranet.apps.eighth.serializers.EighthAddSignupSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.Serializer

class Meta[source]

Bases: object

validators = [<function add_signup_validator>]
class intranet.apps.eighth.serializers.EighthBlockDetailSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.Serializer

class Meta[source]

Bases: object

fields = ('id', 'activities', 'date', 'block_letter')
fetch_activity_list_with_metadata(block)[source]
get_activity(user, favorited_activities, recommended_activities, available_restricted_acts, block_id, activity_id, scheduled_activity=None)[source]
get_scheduled_activity(scheduled_activity_id)[source]
process_scheduled_activity(scheduled_activity, request=None, user=None, favorited_activities=None, recommended_activities=None, available_restricted_acts=None)[source]
class intranet.apps.eighth.serializers.EighthBlockListSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'url', 'date', 'block_letter', 'locked')
model

alias of intranet.apps.eighth.models.EighthBlock

class intranet.apps.eighth.serializers.EighthScheduledActivitySerializer(*args, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'block', 'activity', 'signups', 'capacity')
model

alias of intranet.apps.eighth.models.EighthScheduledActivity

activity_info(scheduled_activity)[source]
block_info(scheduled_activity)[source]
get_capacity(scheduled_activity)[source]
get_name(scheduled_activity)[source]
num_signups(scheduled_activity)[source]
signups_info(scheduled_activity)[source]
class intranet.apps.eighth.serializers.EighthSignupSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'block', 'activity', 'scheduled_activity', 'user')
model

alias of intranet.apps.eighth.models.EighthSignup

activity_info(signup)[source]
block_info(signup)[source]
scheduled_activity_info(signup)[source]
class intranet.apps.eighth.serializers.EighthToggleFavoriteSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.Serializer

class intranet.apps.eighth.serializers.FallbackDict(fallback)[source]

Bases: dict

class intranet.apps.eighth.serializers.UserSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'full_name', 'username', 'url')
model

alias of intranet.apps.users.models.User

get_url(user)[source]
intranet.apps.eighth.serializers.add_signup_validator(value)[source]

intranet.apps.eighth.tasks module

intranet.apps.eighth.tests module

class intranet.apps.eighth.tests.EighthAbstractTest(methodName='runTest')[source]

Bases: intranet.test.ion_test.IonTestCase

add_activity(**args)[source]
add_block(**args)[source]
add_room(**args)[source]
class intranet.apps.eighth.tests.EighthAdminTest(methodName='runTest')[source]

Bases: intranet.apps.eighth.tests.EighthAbstractTest

add_activity(**args)[source]
test_eighth_admin_dashboard_view()[source]
class intranet.apps.eighth.tests.EighthExceptionTest(methodName='runTest')[source]

Bases: intranet.test.ion_test.IonTestCase

test_signup_exception()[source]
class intranet.apps.eighth.tests.EighthTest(methodName='runTest')[source]

Bases: intranet.apps.eighth.tests.EighthAbstractTest

Tests for the eighth module.

create_sponsor()[source]
schedule_activity(block_id, activity_id)[source]
setUp()[source]
test_absence_email()[source]
test_active_schedulings()[source]
test_add_sponsor_form()[source]
test_add_user()[source]

Tests adding a user to a EighthScheduledActivity.

test_all_associated_rooms()[source]

Make sure EighthScheduledActivities can return all associated rooms.

test_blacklist()[source]

Make sure users cannot sign up for blacklisted activities.

test_both_blocks()[source]

Make sure that signing up for a both blocks activity works.

test_cancel_uncancel()[source]
test_passes()[source]
test_past_activities_listed_properly()[source]
test_room_formatting()[source]

Make sure a room name formatting is correct.

test_room_use()[source]

Make sure EighthScheduledActivities return the correct room.

test_signup_status_email()[source]
test_signups()[source]

Do some sample signups.

test_sponsor()[source]
test_switch_cancelled_sticky()[source]

Make sure users can switch out of cancelled activities even if they are stickied in.

test_take_attendance_cancelled()[source]

Make sure students in a cancelled activity are marked as absent when the button is pressed.

test_take_attendance_zero()[source]

Make sure all activities with zero students are marked as having attendance taken when button is pressed.

test_total_capacity()[source]
test_true_capacity()[source]
verify_signup(user, schact)[source]

intranet.apps.eighth.urls module

intranet.apps.eighth.utils module

intranet.apps.eighth.utils.get_start_date(request)[source]
intranet.apps.eighth.utils.set_start_date(request, start_date)[source]

Module contents

class intranet.apps.eighth.HistoricalEighthActivity(id, created_time, last_modified_time, name, description, default_capacity, presign, one_a_day, both_blocks, sticky, special, administrative, finance, restricted, freshmen_allowed, sophomores_allowed, juniors_allowed, seniors_allowed, wed_a, wed_b, fri_a, fri_b, admin_comments, deleted, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

admin_comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

administrative

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

both_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

default_capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deleted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

description

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

finance

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

freshmen_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

fri_a

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

fri_b

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthActivity

juniors_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
one_a_day

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

presign

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property prev_record

Get the previous history record for the instance. None if first.

restricted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

seniors_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sophomores_allowed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

special

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sticky

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

wed_a

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

wed_b

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.HistoricalEighthBlock(id, created_time, last_modified_time, date, signup_time, block_letter, locked, comments, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

block_letter

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthBlock

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

locked

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
property prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

signup_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.HistoricalEighthRoom(id, created_time, last_modified_time, name, capacity, available_for_eighth, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

available_for_eighth

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthRoom

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
property prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

class intranet.apps.eighth.HistoricalEighthScheduledActivity(id, created_time, last_modified_time, admin_comments, title, comments, capacity, both_blocks, special, administrative, restricted, sticky, attendance_taken, cancelled, archived_member_count, block, activity, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

activity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

activity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

admin_comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

administrative

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

archived_member_count

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

attendance_taken

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

block

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

block_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

both_blocks

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

cancelled

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

capacity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthScheduledActivity

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
property prev_record

Get the previous history record for the instance. None if first.

restricted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

special

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sticky

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.HistoricalEighthSignup(id, created_time, last_modified_time, time, after_deadline, previous_activity_name, previous_activity_sponsors, pass_accepted, was_absent, absence_acknowledged, absence_emailed, archived_was_absent, own_signup, user, scheduled_activity, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

absence_acknowledged

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

absence_emailed

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

after_deadline

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

archived_was_absent

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthSignup

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
own_signup

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

pass_accepted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property prev_record

Get the previous history record for the instance. None if first.

previous_activity_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

previous_activity_sponsors

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

revert_url()

URL for this change in the default admin site.

scheduled_activity

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

scheduled_activity_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

was_absent

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.eighth.HistoricalEighthSponsor(id, created_time, last_modified_time, first_name, last_name, department, full_time, online_attendance, contracted_eighth, show_full_name, user, history_id, history_date, history_change_reason, history_type, history_user)

Bases: simple_history.models.HistoricalChanges, django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

contracted_eighth

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

department

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

first_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

full_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_department_display(*, field=<django.db.models.fields.CharField: department>)
get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)
history_change_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_date

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

history_user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

history_user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property instance
instance_type

alias of intranet.apps.eighth.models.EighthSponsor

last_modified_time

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property next_record

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>
online_attendance

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property prev_record

Get the previous history record for the instance. None if first.

revert_url()

URL for this change in the default admin site.

show_full_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.