intranet.apps.eighth package

Subpackages

Submodules

intranet.apps.eighth.admin module

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

Bases: SimpleHistoryAdmin

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

Bases: 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: SimpleHistoryAdmin

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

Bases: SimpleHistoryAdmin

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

Bases: SimpleHistoryAdmin

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

Bases: SimpleHistoryAdmin

list_display = ('first_name', 'last_name', 'user', 'department', 'full_time', 'contracted_eighth', 'online_attendance', 'show_full_name')
list_filter = ('department', 'full_time', 'contracted_eighth', 'online_attendance', 'show_full_name')
ordering = ('last_name', 'first_name')
search_fields = ('first_name', 'last_name', 'user__username')

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 Message

intranet.apps.eighth.models module

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

Bases: Model

Abstract base model that includes created and last modified times. .. attribute:: 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: AbstractBaseEighthModel

Represents an eighth period activity. .. attribute:: 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 2 days 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: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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: int

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: Union[QuerySet, Collection[User]]

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[QuerySet, Collection[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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet 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: bool

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: str

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: str

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: User) List[int][source]

Finds the restricted activities available to the given user. :param 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(*args, **kwargs)[source]

Bases: Manager

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

Bases: AbstractBaseEighthModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
class intranet.apps.eighth.models.EighthActivity_groups_allowed(id, eighthactivity, group)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
class intranet.apps.eighth.models.EighthActivity_users_blacklisted(id, eighthactivity, user)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
class intranet.apps.eighth.models.EighthBlock(*args, **kwargs)[source]

Bases: AbstractBaseEighthModel

Represents an eighth period block. .. attribute:: 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: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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: str

Returns the block date, formatted according to settings.EIGHTH_BLOCK_DATE_FORMAT. :returns: The formatted block date.

get_hidden_signups() Union[QuerySet, Collection[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[QuerySet, Collection[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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>
property hybrid_text: str
Returns the user friendly name of a hybrid block. See Hybrid-README.rst.
    • P1 and * - P2 are returned as * (In-Person)

    • Virt is returned as * (Virtual)

Any other names are returned as themselves.

Returns:

The user friendly name of a hybrid block.

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: bool

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: int

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[QuerySet, Collection[EighthBlock]][source]

Gets future blocks this school year in order. :param 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[QuerySet, Collection[EighthBlock]][source]

Gets the previous blocks this school year in order. :param 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: str
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(*args, **kwargs)[source]

Bases: Manager

get_blocks_this_year() Union[QuerySet, Collection[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[QuerySet, Collection[EighthBlock]][source]

Gets a QuerySet of blocks that occur today. :returns: A QuerySet of all the blocks that occur today.

get_first_upcoming_block() 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[QuerySet, Collection[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[QuerySet, Collection[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: QuerySet

filter_today() Union[QuerySet, Collection[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[QuerySet, Collection[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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
class intranet.apps.eighth.models.EighthRoom(*args, **kwargs)[source]

Bases: AbstractBaseEighthModel

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

The name of the room.

type:

str

capacity

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

Type:

int

available_for_eighth

Whether the room is available for eighth period signups.

Type:

bool

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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: str

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

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet 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: bool

Whether the Room needs to be assigned.

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

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

Returns:

The total capacity of the provided rooms.

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

Bases: AbstractBaseEighthModel

Represents the relationship between an activity and a block in which it has been scheduled. .. attribute:: 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: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
add_user(user: User, request: Optional[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. :param user: The user to add to the scheduled activity. :param request: The request object associated with the signup action. Should always be passed if applicable,

as some information is extracted from the request.

Parameters:
  • 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
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: str

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[QuerySet, Collection[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[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[User] = None) Union[QuerySet, Collection[User]][source]

Returns a QuerySet of the members that you do not have permission to view. :param 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[QuerySet, Collection[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[QuerySet, Collection[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[User] = None) Union[QuerySet, Collection[User]][source]

Returns a QuerySet of the members that you have permission to view, sorted alphabetically. :param 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[QuerySet, Collection[User]][source]

Given a request, returns an unsorted QuerySet of the members that the requesting user has permission to view. :param 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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet 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. :param 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: ~typing.Optional[~datetime.datetime] = None) -> (<class 'bool'>, <module 'datetime' from '/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/datetime.py'>)[source]

Returns whether it is too early to sign up for the activity if it is a presign. This contains the 2 day pre-signup logic. :param 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 and when the activity opens for signups.

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. :param 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: str

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: User) bool[source]

Returns whether the given user is a sponsor of the activity. :param 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(*args, **kwargs)[source]

Bases: Manager

Model Manager for EighthScheduledActivity.

for_sponsor(sponsor: EighthSponsor, include_cancelled: bool = False) Union[QuerySet, Collection[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. :param sponsor: The sponsor to search for. :param 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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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: AbstractBaseEighthModel

Represents a signup/membership in an eighth period activity. .. attribute:: 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: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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. :param nocache: Whether to explicitly disable caching for this check.

Returns:

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

history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet 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[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. :param user: The user who is attempting to remove the EighthSignup. :param force: Whether to force removal. :param 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
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
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(*args, **kwargs)[source]

Bases: Manager

Model manager for EighthSignup.

create_signup(user: User, scheduled_activity: EighthScheduledActivity, **kwargs) 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. :param user: The user to create the EighthSignup for. :param scheduled_activity: The EighthScheduledActivity to sign the user up for.

get_absences() Union[QuerySet, Collection[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: AbstractBaseEighthModel

Represents a sponsor for an eighth period activity. A sponsor could be linked to an actual user or just a name. .. attribute:: 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: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet 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: str

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: bool

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
class intranet.apps.eighth.models.EighthWaitlist(id, created_time, last_modified_time, time, user, block, scheduled_activity)[source]

Bases: AbstractBaseEighthModel

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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
class intranet.apps.eighth.models.EighthWaitlistManager(*args, **kwargs)[source]

Bases: Manager

Model manager for EighthWaitlist.

check_for_prescence(activity: EighthScheduledActivity, user: User) bool[source]

Returns whether the given user is in a waitlist for the given activity. :param activity: The activity for which the waitlist should be queried. :param 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: EighthScheduledActivity) Union[QuerySet, Collection[EighthWaitlist]][source]

Returns a QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time. :param 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. :param aid: The ID of the EighthScheduledActivity for which the waitlist should be queried. :param 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: 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(*args, **kwargs)[source]

Bases: 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 EighthActivity

fetch_scheduled_on(act)[source]
class intranet.apps.eighth.serializers.EighthActivityListSerializer(*args, **kwargs)[source]

Bases: HyperlinkedModelSerializer

class Meta[source]

Bases: object

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

alias of EighthActivity

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

Bases: Serializer

class Meta[source]

Bases: object

validators = [<function add_signup_validator>]
class intranet.apps.eighth.serializers.EighthBlockDetailSerializer(*args, **kwargs)[source]

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

Bases: HyperlinkedModelSerializer

class Meta[source]

Bases: object

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

alias of EighthBlock

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

Bases: ModelSerializer

class Meta[source]

Bases: object

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

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

Bases: ModelSerializer

class Meta[source]

Bases: object

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

alias of EighthSignup

activity_info(signup)[source]
block_info(signup)[source]
scheduled_activity_info(signup)[source]
class intranet.apps.eighth.serializers.EighthToggleFavoriteSerializer(*args, **kwargs)[source]

Bases: Serializer

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

Bases: dict

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

Bases: ModelSerializer

class Meta[source]

Bases: object

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

alias of User

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

intranet.apps.eighth.tasks module

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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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
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
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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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
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
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: HistoricalChanges, Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: 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.

static get_default_history_user(instance)

Returns the user specified by get_user method for manually creating historical objects

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
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 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