intranet.apps.eighth package¶
Subpackages¶
- intranet.apps.eighth.forms package
- Subpackages
- intranet.apps.eighth.forms.admin package
- Submodules
- intranet.apps.eighth.forms.admin.activities module
- intranet.apps.eighth.forms.admin.blocks module
- intranet.apps.eighth.forms.admin.general module
- intranet.apps.eighth.forms.admin.groups module
- intranet.apps.eighth.forms.admin.rooms module
- intranet.apps.eighth.forms.admin.scheduling module
- intranet.apps.eighth.forms.admin.sponsors module
- Module contents
- intranet.apps.eighth.forms.admin package
- Module contents
- Subpackages
- intranet.apps.eighth.management package
- Subpackages
- intranet.apps.eighth.management.commands package
- Submodules
- intranet.apps.eighth.management.commands.absence_email module
- intranet.apps.eighth.management.commands.delete_duplicate_signups module
- intranet.apps.eighth.management.commands.dev_create_blocks module
- intranet.apps.eighth.management.commands.find_duplicates module
- intranet.apps.eighth.management.commands.generate_similarities module
- intranet.apps.eighth.management.commands.generate_statistics module
- intranet.apps.eighth.management.commands.remove_withdrawn_students module
- intranet.apps.eighth.management.commands.signup_status_email module
- intranet.apps.eighth.management.commands.update_counselors module
- Module contents
- intranet.apps.eighth.management.commands package
- Module contents
- Subpackages
- intranet.apps.eighth.views package
- Subpackages
- intranet.apps.eighth.views.admin package
- Submodules
- intranet.apps.eighth.views.admin.activities module
- intranet.apps.eighth.views.admin.attendance module
- intranet.apps.eighth.views.admin.blocks module
- intranet.apps.eighth.views.admin.general module
- intranet.apps.eighth.views.admin.groups module
- intranet.apps.eighth.views.admin.maintenance module
- intranet.apps.eighth.views.admin.rooms module
- intranet.apps.eighth.views.admin.scheduling module
- intranet.apps.eighth.views.admin.sponsors module
- intranet.apps.eighth.views.admin.users module
- Module contents
- intranet.apps.eighth.views.admin package
- Submodules
- intranet.apps.eighth.views.activities module
- intranet.apps.eighth.views.api module
- intranet.apps.eighth.views.attendance module
- intranet.apps.eighth.views.monitoring module
- intranet.apps.eighth.views.profile module
- intranet.apps.eighth.views.routers module
- intranet.apps.eighth.views.signup module
- Module contents
- Subpackages
Submodules¶
intranet.apps.eighth.admin module¶
-
class
intranet.apps.eighth.admin.
EighthActivityAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('name', 'special', 'administrative', 'deleted')¶
-
list_filter
= ('special', 'administrative', 'deleted')¶
-
ordering
= ('name',)¶
-
-
class
intranet.apps.eighth.admin.
EighthBlockAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('date', 'block_letter', 'comments', 'signup_time', 'locked')¶
-
list_filter
= ('locked',)¶
-
ordering
= ('date', 'block_letter')¶
-
-
class
intranet.apps.eighth.admin.
EighthRoomAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('name', 'capacity')¶
-
ordering
= ('name',)¶
-
-
class
intranet.apps.eighth.admin.
EighthScheduledActivityAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('activity', 'block', 'comments', 'admin_comments', 'cancelled')¶
-
list_filter
= ('block', 'cancelled')¶
-
ordering
= ('block', 'activity')¶
-
-
class
intranet.apps.eighth.admin.
EighthSignupAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('user', 'get_activity', 'get_block', 'after_deadline', 'was_absent')¶
-
list_filter
= ('scheduled_activity__block',)¶
-
ordering
= ('scheduled_activity', 'user')¶
-
raw_id_fields
= ('user', 'scheduled_activity')¶
-
-
class
intranet.apps.eighth.admin.
EighthSponsorAdmin
(model, admin_site)[source]¶ Bases:
simple_history.admin.SimpleHistoryAdmin
-
list_display
= ('first_name', 'last_name', 'user', 'online_attendance', 'show_full_name')¶
-
list_filter
= ('online_attendance', 'show_full_name')¶
-
ordering
= ('last_name', 'first_name')¶
-
intranet.apps.eighth.context_processors module¶
-
intranet.apps.eighth.context_processors.
absence_count
(request)[source]¶ Add the absence count to the context for students.
- Parameters
request – The request object
- Returns
Number of absences that a student has if a student, an empty dictionary otherwise.
intranet.apps.eighth.exceptions module¶
-
intranet.apps.eighth.exceptions.
m
¶ alias of
intranet.apps.eighth.exceptions.Message
intranet.apps.eighth.models module¶
-
class
intranet.apps.eighth.models.
AbstractBaseEighthModel
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Abstract base model that includes created and last modified times.
-
created_time
¶ The time the model was created
- Type
datetime
-
last_modified_time
¶ The time the model was last modified.
- Type
datetime
-
created_time
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_modified_time
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
intranet.apps.eighth.models.
EighthActivity
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents an eighth period activity.
-
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
-
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
-
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
ofEighthRoom
-
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
-
presign
¶ If True, the activity can only be signed up for within 48 hours of the day that the activity is scheduled.
- Type
-
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
-
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
-
special
¶ If True, then the activity receives a special designation on the signup list, and is stuck to the top of the list.
- Type
-
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
-
finance
¶ The account name of the club with the Finance Office. If blank or null, there is no account.
- Type
-
restricted
¶ Whether the signups for the activity are restricted to certain users/groups or if there are blacklisted users.
- Type
-
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
ofUser
-
groups_allowed
¶ Individual groups allowed to sign up for this activity. Only takes effect if the activity is restricted.
- Type
list
ofGroup
-
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
ofUser
-
freshman_allowed
¶ Whether freshmen are allowed to sign up for this activity. Only takes effect if the activity is restricted.
- Type
-
sophomores_allowed
¶ Whether sophomores are allowed to sign up for this activity. Only takes effect if the activity is restricted.
- Type
-
juniors_allowed
¶ Whether juniors are allowed to sign up for this activity. Only takes effect if the activity is restricted.
- Type
-
seniors_allowed
¶ Whether seniors are allowed to sign up for this activity. Only takes effect if the activity is restricted.
- Type
-
wed_a
¶ Whether the activity generally meets on Wednesday A blocks. Does not affect schedule, is just information for the Eighth Office.
- Type
-
wed_b
¶ Whether the activity generally meets on Wednesday B blocks. Does not affect schedule, is just information for the Eighth Office.
- Type
-
fri_a
¶ Whether the activity generally meets on Friday A blocks. Does not affect schedule, is just information for the Eighth Office.
- Type
-
fri_b
¶ Whether the activity generally meets on Friday B blocks. Does not affect schedule, is just information for the Eighth Office.
- Type
-
similarities
¶ A ManyToManyField of EighthActivitySimilarity objects which are similar to this activity.
- Type
-
deleted
¶ Whether the activity still technically exists in the system, but was marked to be deleted.
- Type
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
admin_comments
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
administrative
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
aid
¶ The publicly visible activity ID.
- Returns
The public activity ID.
-
classmethod
available_ids
() → List[int][source]¶ Returns all available IDs not used by an EighthActivity.
- Returns
A list of the available activity IDs.
-
both_blocks
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
capacity
() → int[source]¶ Returns ‘default_capacity’ if it is set. Otherwise, returns the total capacity of all the activity’s rooms.
- Returns
The activity’s capacity.
-
default_capacity
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthblock_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
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 aReverseManyToOneDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
finance
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
frequent_users
¶ Return a QuerySet of user id’s and counts that have signed up for this activity more than settings.SIMILAR_THRESHOLD times.
This is used for suggesting activities to users.
- Returns
A QuerySet of users who attend this activity frequently.
-
freshmen_allowed
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
fri_a
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
fri_b
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_active_schedulings
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthScheduledActivity]][source]¶ Returns all EighthScheduledActivitys scheduled this year for this activity.
- Returns
EighthScheduledActivitys of this activity occurring this year.
-
groups_allowed
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_active
¶ Returns whether an activity is “active.” An activity is considered to be active if it has been scheduled at all this year.
- Returns:
Whether the activity is active.
-
property
is_popular
¶ Returns whether this activity has more than
settings.SIMILAR_THRESHOLD * 2
frequent_users.- Returns
Whether this activity has more than
settings.SIMILAR_THRESHOLD * 2
frequent_users.
-
juniors_allowed
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
name_with_flags
¶ Return the activity name with special, both blocks, restricted, administrative, sticky, and deleted flags.
- Returns
The activity name with all flags.
-
property
name_with_flags_no_restricted
¶ Returns the activity’s name with flags. These flags indicate whether the activity is special, both blocks, administrative, sticky, and/or cancelled.
- Returns:
The activity name with all flags except the “restricted” flag.
-
objects
= <django.db.models.manager.Manager object>¶
-
one_a_day
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
presign
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
restricted
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
classmethod
restricted_activities_available_to_user
(user: intranet.apps.users.models.User) → List[int][source]¶ Finds the restricted activities available to the given user.
- Parameters
user – The User to find the restricted activities for.
- Returns
The restricted activities available to the user.
-
rooms
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
wed_a
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
wed_b
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
intranet.apps.eighth.models.
EighthActivityExcludeDeletedManager
[source]¶ Bases:
django.db.models.manager.Manager
-
class
intranet.apps.eighth.models.
EighthActivitySimilarity
(id, created_time, last_modified_time, count, weighted)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
-
exception
DoesNotExist
¶
-
exception
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
andTopping.pizzas
areManyToManyDescriptor
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.
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_favorites
(id, eighthactivity, user)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_groups_allowed
(id, eighthactivity, group)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
group
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
group_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_rooms
(id, eighthactivity, eighthroom)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthroom
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
eighthroom_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_similarities
(id, eighthactivity, eighthactivitysimilarity)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthactivitysimilarity
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
eighthactivitysimilarity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_sponsors
(id, eighthactivity, eighthsponsor)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthsponsor
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
eighthsponsor_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_users_allowed
(id, eighthactivity, user)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.models.
EighthActivity_users_blacklisted
(id, eighthactivity, user)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.models.
EighthBlock
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents an eighth period block.
-
date
¶ The date of the block.
-
signup_time
¶ The recommended time at which all users should sign up. This does not prevent people from signing up at this time, however students will see the amount of time left to sign up. Defaults to 12:40.
-
block_letter
¶ The block letter (e.g. A, B, A1, A2, SOL). Despite its name, it can now be more than just a letter.
-
locked
¶ Whether signups are closed.
-
activities
¶ List of
EighthScheduledActivity
s for the block.
-
override_blocks
¶ List of
EighthBlock
s 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
¶
-
exception
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
property
formatted_date
¶ Returns the block date, formatted according to
settings.EIGHTH_BLOCK_DATE_FORMAT
.- Returns
The formatted block date.
Returns a QuerySet of EighthSignups whose users are not students but have signed up for an activity.
This is usually a list of signups for the z-Withdrawn from TJ activity.
- Returns
A QuerySet of users who are not current students but have signed up for an activity this block.
-
get_next_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)¶
-
get_previous_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)¶
-
get_unsigned_students
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]¶ Return a QuerySet of people who haven’t signed up for an activity during this block.
- Returns
The users who have not signed up for an activity during this block.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
in_clear_absence_period
() → bool[source]¶ Returns whether today’s date is within the block’s clear absence period. This determines whether the option to clear an eighth period absence should be shown. If the block is not within the clear absence period, an absence cannot be cleared.
- Returns
Whether the current date is in the block’s clear absence period.
-
property
is_this_year
¶ Return whether the block occurs during this school year.
- Returns
Whether the block occurs during this school year.
-
is_today
() → bool[source]¶ Returns whether the block occurs today.
- Returns
Whether the block occurs today.
-
property
letter_width
¶ Returns the width in pixels that should be allocated for the block_letter on the signup page.
- Returns
The width in pixels of the block letter.
-
locked
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
next_blocks
(quantity: int = -1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets future blocks this school year in order.
- Parameters
quantity – The number of blocks to list after this block, or -1 for all following blocks.
- Returns
A QuerySet with the specified number of future blocks this school year. If
quantity
is passed, then the QuerySet will not be filter()-able.
-
num_no_signups
() → int[source]¶ Gets how many people have not signed up for an activity this block.
- Returns
The number of people who have not signed up for an activity during this block.
-
num_signups
() → int[source]¶ Gets how many people have signed up for an activity this block.
- Returns
The number of people who have signed up for an activity during this block.
-
objects
= <intranet.apps.eighth.models.EighthBlockManager object>¶
-
override_blocks
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
previous_blocks
(quantity: int = -1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets the previous blocks this school year in order.
- Parameters
quantity – The number of blocks to list before this block, or -1 for all previous blocks.
- Returns
If quantity is not passed, retuns a QuerySet with all the blocks this school year before this block.
If quantity is passed, returns a list with the specified number of blocks this school year before this block.
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
property
short_text
¶ Returns the date and block letter for this block.
It is returned in the format of MM/DD B, like “9/1 B”
- Returns
The date and block letter.
-
signup_time
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
intranet.apps.eighth.models.
EighthBlockManager
[source]¶ Bases:
django.db.models.manager.Manager
-
get_blocks_this_year
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets a QuerySet of blocks that occur this school year.
- Returns
A QuerySet of all the blocks that occur during this school year.
-
get_blocks_today
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets a QuerySet of blocks that occur today.
- Returns
A QuerySet of all the blocks that occur today.
-
get_first_upcoming_block
() → intranet.apps.eighth.models.EighthBlock[source]¶ Gets the first upcoming block (the first block that will take place in the future).
- Returns
The first upcoming
EighthBlock
object, orNone
if there are none upcoming.
-
get_next_upcoming_blocks
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets the next upccoming blocks.
It finds the other blocks that are occurring on the day of the first upcoming block.
- Returns
A QuerySet of the next upcoming
EighthBlock
objects.
-
get_upcoming_blocks
(max_number: int = -1) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthBlock]][source]¶ Gets the given number of upcoming blocks that will take place in the future.
If there is no block in the future, the most recent block will be returned.
- Returns
A QuerySet of the X upcoming
EighthBlock
objects.
-
-
class
intranet.apps.eighth.models.
EighthBlockQuerySet
(model=None, query=None, using=None, hints=None)[source]¶
-
class
intranet.apps.eighth.models.
EighthBlock_override_blocks
(id, from_eighthblock, to_eighthblock)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
from_eighthblock_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
to_eighthblock
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
to_eighthblock_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.models.
EighthRoom
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents a room in which an eighth period activity can be held.
-
exception
DoesNotExist
¶
-
exception
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
property
formatted_name
¶ The formatted name of the room.
If it looks like the room is a numbered room – the name starts with either a number or with the text “Room” – returns “Rm. <room number>.”
- Returns
The formatted name of the Room.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
property
to_be_determined
¶ Whether the Room needs to be assigned.
-
static
total_capacity_of_rooms
(rooms: Iterable[EighthRoom]) → int[source]¶ Returns the total capacity of the provided rooms.
- Parameters
rooms – Rooms to determine total capacity for.
- Returns
The total capacity of the provided rooms.
-
unique_together
= (('name', 'capacity'),)¶
-
exception
-
class
intranet.apps.eighth.models.
EighthScheduledActivity
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents the relationship between an activity and a block in which it has been scheduled.
-
block
¶ EighthBlock
TheEighthBlock
during which anEighthActivity
has been scheduled
-
activity
¶ The scheduled
EighthActivity
-
members
¶ The
User
s who have signed up for anEighthBlock
-
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
¶ EighthSponsor
s that will override theEighthActivity
’s default sponsors
-
rooms
¶ EighthRoom
s that will override theEighthActivity
’s default rooms
-
attendance_taken
¶ Whether the
EighthSponsor
for the scheduledEighthActivity
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
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
activity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
add_user
(user: get_user_model(), request: Optional[django.http.request.HttpRequest] = None, force: bool = False, no_after_deadline: bool = False, add_to_waitlist: bool = False)[source]¶ Signs up a user to this scheduled activity if possible. This is where the magic happens.
Raises an exception if there’s a problem signing the user up unless the signup is forced and the requesting user has permission.
- Parameters
user – The user to add to the scheduled activity.
request – The request object associated with the signup action. Should always be passed if applicable, as some information is extracted from the request.
force – Whether to force the signup.
no_after_deadline – Whether to mark the user as not having signed up after the deadline, regardless of whether they did or not.
add_to_waitlist – Explicitly add the user to the waitlist.
-
admin_comments
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
administrative
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
archived_member_count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
attendance_taken
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
block
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
block_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
both_blocks
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cancel
()[source]¶ Cancel an EighthScheduledActivity and send a notification email to signed-up students. This method should be always be called instead of setting the ‘cancelled’ flag manually. (Note: To avoid spamming students signed up for both-block activities, an email is not sent for the B-block activity in both-block activities.)
-
cancelled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
capacity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comments
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthsignup_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
property
full_title
¶ Gets the full title for the activity, appending the title of the scheduled activity to the activity’s name.
- Returns
The full title for the scheduled activity, without flags.
-
get_administrative
() → bool[source]¶ Returns whether this scheduled activity is administrative.
- Returns
Whether this activity is administrative
-
get_all_associated_rooms
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthRoom]][source]¶ Returns a QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity.
- Returns
A QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity.
-
get_both_blocks_sibling
() → Optional[intranet.apps.eighth.models.EighthScheduledActivity][source]¶ If this is a both-blocks activity, get the other EighthScheduledActivity object that occurs on the other block.
both_blocks means A and B block, NOT all of the blocks on that day.
- Returns
EighthScheduledActivity object if found.
None
, if the activity cannot have a sibling.
-
get_finance
() → str[source]¶ Retrieves the name of this activity’s account with the finance office, if any.
- Returns
The name of this activity’s account with the finance office.
Returns a QuerySet of the members that you do not have permission to view.
- Parameters
user – The user who is attempting to view the member list.
- Returns
Unsorted QuerySet of the members that you do not have permission to view.
-
get_restricted
() → bool[source]¶ Gets whether this scheduled activity is restricted.
- Returns
Whether this scheduled activity is restricted.
-
get_special
() → bool[source]¶ Returns whether this scheduled activity is special.
- Returns
Whether this scheduled activity is special.
-
get_sticky
() → bool[source]¶ Gets whether this scheduled activity is sticky.
- Returns
Whether this scheduled activity is sticky.
-
get_true_capacity
() → int[source]¶ Retrieves the capacity for the scheduled activity, taking into account activity defaults and overrides.
- Returns
The true capacity of the scheduled activity.
-
get_true_rooms
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthRoom]][source]¶ Retrieves the rooms for the scheduled activity, taking into account activity defaults and overrides.
- Returns
The true room list of the scheduled activity.
-
get_true_sponsors
() → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthSponsor]][source]¶ Retrieves the sponsors for the scheduled activity, taking into account activity defaults and overrides.
- Returns
The sponsors for this scheduled activity.
-
get_viewable_members
(user: Optional[intranet.apps.users.models.User] = None) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]¶ Returns a QuerySet of the members that you have permission to view, sorted alphabetically.
- Parameters
user – The user who is attempting to view the member list.
- Returns
QuerySet of the members that you have permission to view, sorted alphabetically.
-
get_viewable_members_serializer
(request) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.users.models.User]][source]¶ Given a request, returns an unsorted QuerySet of the members that the requesting user has permission to view.
- Parameters
request – The request object associated with the member list query.
- Returns
Unsorted QuerySet of the members that you have permssion to view.
-
has_open_passes
() → bool[source]¶ Returns whether there are passes that have not been acknowledged.
- Returns
Whether this activity has open passes.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_almost_full
() → bool[source]¶ Returns whether the scheduled activity is almost full (>=90%).
- Returns
Whether this scheduled activity is at least 90% full.
-
is_both_blocks
() → bool[source]¶ Gets whether this scheduled activity runs both blocks.
- Returns
Whether this scheduled activity runs both blocks.
-
is_full
(nocache: bool = False) → bool[source]¶ Returns whether the scheduled activity is full.
- Parameters
nocache – Whether to disable caching for the query that checks the scheduled activity’s current capacity.
- Returns
Whether this scheduled activity is full.
-
is_overbooked
() → bool[source]¶ Returns whether the activity is overbooked (>100%) capacity.
- Returns
Whether this scheduled activity is overbooked.
-
is_too_early_to_signup
(now: Optional[datetime.datetime] = None) → bool[source]¶ Returns whether it is too early to sign up for the activity if it is a presign.
This contains the 48 hour presign logic.
- Parameters
now – A datetime object to use for the check instead of the current time.
- Returns
Whether it is too early to sign up for this scheduled activity.
-
members
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
notify_waitlist
(waitlists: Iterable[EighthWaitlist])[source]¶ Notifies all users on the given EighthWaitlist objects that the activity they are on the waitlist for has an open spot.
- Parameters
waitlists – The EighthWaitlist objects whose users should be notified that the activity has an open slot.
-
objects
= <intranet.apps.eighth.models.EighthScheduledActivityManager object>¶
-
restricted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
rooms
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
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.
-
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
sticky
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
title_with_flags
¶ Gets the title for the activity, appending the title of the scheduled activity to the activity’s name and flags.
- Returns
The full title for the scheduled activity, with flags.
-
uncancel
()[source]¶ Uncancel an EighthScheduledActivity.
This does nothing besides unset the cancelled flag and save the object.
-
user_is_sponsor
(user: intranet.apps.users.models.User) → bool[source]¶ Returns whether the given user is a sponsor of the activity.
- Parameters
user – The user to check for sponsorship of this activity.
- Returns
Whether the given user is a sponsor of the activity.
-
waitlist
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
-
class
intranet.apps.eighth.models.
EighthScheduledActivityManager
[source]¶ Bases:
django.db.models.manager.Manager
Model Manager for EighthScheduledActivity.
-
for_sponsor
(sponsor: intranet.apps.eighth.models.EighthSponsor, include_cancelled: bool = False) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthScheduledActivity]][source]¶ Returns a QuerySet of EighthScheduledActivities where the given EighthSponsor is sponsoring.
If a sponsorship is defined in an EighthActivity, it may be overridden on a block by block basis in an EighthScheduledActivity. Sponsors from the EighthActivity do not carry over.
EighthScheduledActivities that are deleted or cancelled are also not counted.
- Parameters
sponsor – The sponsor to search for.
include_cancelled – Whether to include cancelled activities. Deleted activities are always excluded.
- Returns
- A QuerySet of EighthScheduledActivities where the given EighthSponsor
is sponsoring.
-
-
class
intranet.apps.eighth.models.
EighthScheduledActivity_rooms
(id, eighthscheduledactivity, eighthroom)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthroom_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthscheduledactivity
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
eighthscheduledactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthScheduledActivity_sponsors
(id, eighthscheduledactivity, eighthsponsor)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
eighthscheduledactivity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
eighthsponsor
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
eighthsponsor_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
exception
-
class
intranet.apps.eighth.models.
EighthSignup
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents a signup/membership in an eighth period activity.
-
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
¶
-
exception
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.
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
has_conflict
(nocache: bool = False) → bool[source]¶ Returns True if another EighthSignup object exists for the same user in the same block.
- Parameters
nocache – Whether to explicitly disable caching for this check.
- Returns
Whether there is another EighthSignup for the same user in the same block.
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
in_clear_absence_period
() → bool[source]¶ Returns whether the block for this signup is in the clear absence period.
- Returns
Whether the block for this signup is in the clear absence period.
-
objects
= <intranet.apps.eighth.models.EighthSignupManager object>¶
-
own_signup
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
pass_accepted
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
previous_activity_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
previous_activity_sponsors
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
remove_signup
(user: Optional[intranet.apps.users.models.User] = None, force: bool = False, dont_run_waitlist: bool = False) → str[source]¶ Attempts to remove the EighthSignup if the user has permission to do so.
- Parameters
user – The user who is attempting to remove the EighthSignup.
force – Whether to force removal.
dont_run_waitlist – Whether to skip notifying users on the activity’s waitlist.
- Returns
A message to be displayed to the user indicating successful removal.
-
save_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 aForwardManyToOneDescriptor
instance.
-
scheduled_activity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
validate_unique
(*args, **kwargs)[source]¶ Checked whether more than one EighthSignup exists for a User on a given EighthBlock.
-
was_absent
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
intranet.apps.eighth.models.
EighthSignupManager
[source]¶ Bases:
django.db.models.manager.Manager
Model manager for EighthSignup.
-
create_signup
(user: intranet.apps.users.models.User, scheduled_activity: intranet.apps.eighth.models.EighthScheduledActivity, **kwargs) → intranet.apps.eighth.models.EighthSignup[source]¶ Creates an EighthSignup for the given user in the given activity after checking for duplicate signups.
This raises an error if there are duplicate signups.
- Parameters
user – The user to create the EighthSignup for.
scheduled_activity – The EighthScheduledActivity to sign the user up for.
-
-
class
intranet.apps.eighth.models.
EighthSponsor
(*args, **kwargs)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
Represents a sponsor for an eighth period activity.
A sponsor could be linked to an actual user or just a name.
-
show_full_name
¶ Whether to always show the sponsor’s full name (e.x. because there are two teachers named Lewis).
- Type
-
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
¶
-
exception
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
andTopping.pizzas
areManyToManyDescriptor
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
first_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
full_time
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_department_display
(*, field=<django.db.models.fields.CharField: department>)¶
-
history
= <simple_history.manager.HistoryManager object>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
name
¶ If show_full_name is set, returns “last name, first name”. Otherwise, returns last name only.
- Returns
The name to display for the sponsor, omitting the first name unless explicitly requested.
-
objects
= <django.db.models.manager.Manager object>¶
-
online_attendance
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save_without_historical_record
(*args, **kwargs)¶ Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
-
show_full_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
to_be_assigned
¶ Returns True if the sponsor’s name contains “to be assigned” or similar.
- Returns
Whether the sponsor is a “to be assigned” sponsor.
-
user
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
intranet.apps.eighth.models.
EighthWaitlist
(id, created_time, last_modified_time, time, user, block, scheduled_activity)[source]¶ Bases:
intranet.apps.eighth.models.AbstractBaseEighthModel
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
block_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <intranet.apps.eighth.models.EighthWaitlistManager object>¶
-
scheduled_activity
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
scheduled_activity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.models.
EighthWaitlistManager
[source]¶ Bases:
django.db.models.manager.Manager
Model manager for EighthWaitlist.
-
check_for_prescence
(activity: intranet.apps.eighth.models.EighthScheduledActivity, user: intranet.apps.users.models.User) → bool[source]¶ Returns whether the given user is in a waitlist for the given activity.
- Parameters
activity – The activity for which the waitlist should be queried.
user – The user who should be searched for in the activity’s waitlist.
- Returns
Whether the given user is in a waitlist for the given activity.
-
get_next_waitlist
(activity: intranet.apps.eighth.models.EighthScheduledActivity) → Union[django.db.models.query.QuerySet, Collection[intranet.apps.eighth.models.EighthWaitlist]][source]¶ Returns a QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time.
- Parameters
activity – The activity to list the EighthWaitlist objects for.
- Returns
A QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time.
-
position_in_waitlist
(aid: int, uid: int) → int[source]¶ Given an activity ID and a user ID, returns the user’s position in the waitlist (starting at 1). If the user is not in the waitlist, returns 0.
- Parameters
aid – The ID of the EighthScheduledActivity for which the waitlist should be queried.
uid – The ID of the user whose position in the waitlist should be found.
- Returns
The user’s position in the waitlist, starting at 1, or 0 if the user is not in the waitlist.
-
intranet.apps.eighth.notifications module¶
intranet.apps.eighth.serializers module¶
-
class
intranet.apps.eighth.serializers.
EighthActivityDetailSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.HyperlinkedModelSerializer
-
class
intranet.apps.eighth.serializers.
EighthActivityListSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.HyperlinkedModelSerializer
-
class
intranet.apps.eighth.serializers.
EighthAddSignupSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.Serializer
-
class
intranet.apps.eighth.serializers.
EighthBlockDetailSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.Serializer
-
class
intranet.apps.eighth.serializers.
EighthBlockListSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.HyperlinkedModelSerializer
-
class
intranet.apps.eighth.serializers.
EighthScheduledActivitySerializer
(*args, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
intranet.apps.eighth.serializers.
EighthSignupSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
-
class
intranet.apps.eighth.serializers.
EighthToggleFavoriteSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.Serializer
-
class
intranet.apps.eighth.serializers.
UserSerializer
(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]¶ Bases:
rest_framework.serializers.ModelSerializer
intranet.apps.eighth.tasks module¶
intranet.apps.eighth.tests module¶
-
class
intranet.apps.eighth.tests.
EighthTest
(methodName='runTest')[source]¶ Bases:
intranet.apps.eighth.tests.EighthAbstractTest
Tests for the eighth module.
-
test_all_associated_rooms
()[source]¶ Make sure EighthScheduledActivities can return all associated rooms.
-
test_switch_cancelled_sticky
()[source]¶ Make sure users can switch out of cancelled activities even if they are stickied in.
-
test_take_attendance_cancelled
()[source]¶ Make sure students in a cancelled activity are marked as absent when the button is pressed.
-
intranet.apps.eighth.urls module¶
intranet.apps.eighth.utils module¶
Module contents¶
-
class
intranet.apps.eighth.
HistoricalEighthActivity
(id, created_time, last_modified_time, name, description, default_capacity, presign, one_a_day, both_blocks, sticky, special, administrative, finance, restricted, freshmen_allowed, sophomores_allowed, juniors_allowed, seniors_allowed, wed_a, wed_b, fri_a, fri_b, admin_comments, deleted, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
admin_comments
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
administrative
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
both_blocks
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
default_capacity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
finance
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
freshmen_allowed
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
fri_a
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
fri_b
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶
-
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.
-
exception
-
class
intranet.apps.eighth.
HistoricalEighthBlock
(id, created_time, last_modified_time, date, signup_time, block_letter, locked, comments, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
block_letter
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comments
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶
-
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.
-
exception
-
class
intranet.apps.eighth.
HistoricalEighthRoom
(id, created_time, last_modified_time, name, capacity, available_for_eighth, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
available_for_eighth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
capacity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶
-
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.
-
exception
-
class
intranet.apps.eighth.
HistoricalEighthScheduledActivity
(id, created_time, last_modified_time, admin_comments, title, comments, capacity, both_blocks, special, administrative, restricted, sticky, attendance_taken, cancelled, archived_member_count, block, activity, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
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 aForwardManyToOneDescriptor
instance.
-
activity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
admin_comments
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
administrative
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
archived_member_count
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
attendance_taken
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
block
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
block_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
both_blocks
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cancelled
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
capacity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comments
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶ alias of
intranet.apps.eighth.models.EighthScheduledActivity
-
last_modified_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
next_record
¶ Get the next history record for the instance. None if last.
-
objects
= <django.db.models.manager.Manager object>¶
-
property
prev_record
¶ Get the previous history record for the instance. None if first.
-
restricted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
revert_url
()¶ URL for this change in the default admin site.
-
special
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
sticky
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.
HistoricalEighthSignup
(id, created_time, last_modified_time, time, after_deadline, previous_activity_name, previous_activity_sponsors, pass_accepted, was_absent, absence_acknowledged, absence_emailed, archived_was_absent, own_signup, user, scheduled_activity, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
absence_acknowledged
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
absence_emailed
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
after_deadline
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
archived_was_absent
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶
-
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 aForwardManyToOneDescriptor
instance.
-
scheduled_activity_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
was_absent
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
intranet.apps.eighth.
HistoricalEighthSponsor
(id, created_time, last_modified_time, first_name, last_name, department, full_time, online_attendance, contracted_eighth, show_full_name, user, history_id, history_date, history_change_reason, history_type, history_user)¶ Bases:
simple_history.models.HistoricalChanges
,django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
contracted_eighth
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
department
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
full_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_department_display
(*, field=<django.db.models.fields.CharField: department>)¶
-
get_history_type_display
(*, field=<django.db.models.fields.CharField: history_type>)¶
-
get_next_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
-
get_previous_by_history_date
(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
-
history_change_reason
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
history_user
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
history_user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
instance
¶
-
instance_type
¶
-
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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception