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
- Submodules
- intranet.apps.eighth.forms.activities module
- intranet.apps.eighth.forms.fields module
- 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.dev_generate_signups 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_statistics 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.tests package
- Subpackages
- intranet.apps.eighth.tests.admin package
- Submodules
- intranet.apps.eighth.tests.admin.test_admin_activities module
- intranet.apps.eighth.tests.admin.test_admin_attendance module
- intranet.apps.eighth.tests.admin.test_admin_blocks module
- intranet.apps.eighth.tests.admin.test_admin_general module
- intranet.apps.eighth.tests.admin.test_admin_groups module
- intranet.apps.eighth.tests.admin.test_admin_maintenance module
- intranet.apps.eighth.tests.admin.test_admin_rooms module
- intranet.apps.eighth.tests.admin.test_admin_scheduling module
- intranet.apps.eighth.tests.admin.test_admin_sponsors module
- intranet.apps.eighth.tests.admin.test_admin_users module
- Module contents
- intranet.apps.eighth.tests.admin package
- Submodules
- intranet.apps.eighth.tests.eighth_test module
- intranet.apps.eighth.tests.test_activities module
EighthActivitiesTestCase
EighthActivitiesTestCase.test_activity_stats()
EighthActivitiesTestCase.test_calculate_statistics()
EighthActivitiesTestCase.test_generate_statistics_pdf()
EighthActivitiesTestCase.test_past_activities_listed_properly()
EighthActivitiesTestCase.test_stats_global_view()
EighthActivitiesTestCase.test_stats_view()
- intranet.apps.eighth.tests.test_attendance module
EighthAttendanceTestCase
EighthAttendanceTestCase.test_accept_all_passes_view()
EighthAttendanceTestCase.test_accept_pass_view()
EighthAttendanceTestCase.test_attendance_export_csv()
EighthAttendanceTestCase.test_eighth_absences_view()
EighthAttendanceTestCase.test_email_students_view()
EighthAttendanceTestCase.test_generate_roster_pdf()
EighthAttendanceTestCase.test_raw_roster_view()
EighthAttendanceTestCase.test_raw_waitlist_view()
EighthAttendanceTestCase.test_roster_view()
EighthAttendanceTestCase.test_sponsor_schedule_widget_view()
EighthAttendanceTestCase.test_take_attendance()
EighthAttendanceTestCase.test_take_attendance_clear_bit()
EighthAttendanceTestCase.test_take_attendance_google_meet_csv()
EighthAttendanceTestCase.test_teacher_choose_scheduled_activity_view()
- intranet.apps.eighth.tests.test_commands module
EighthCommandsTest
EighthCommandsTest.test_absence_email()
EighthCommandsTest.test_delete_duplicate_signups()
EighthCommandsTest.test_dev_create_blocks()
EighthCommandsTest.test_dev_generate_signups()
EighthCommandsTest.test_find_duplicates()
EighthCommandsTest.test_generate_similarities()
EighthCommandsTest.test_generate_statistics()
EighthCommandsTest.test_remove_withdrawn_students()
EighthCommandsTest.test_signup_statistics()
EighthCommandsTest.test_signup_status_email()
EighthCommandsTest.test_update_counselor()
- intranet.apps.eighth.tests.test_exceptions module
- intranet.apps.eighth.tests.test_general module
EighthTest
EighthTest.test_absence_email()
EighthTest.test_active_schedulings()
EighthTest.test_all_associated_rooms()
EighthTest.test_blacklist()
EighthTest.test_both_blocks()
EighthTest.test_cancel_uncancel()
EighthTest.test_passes()
EighthTest.test_room_formatting()
EighthTest.test_room_use()
EighthTest.test_signup_status_email()
EighthTest.test_signups()
EighthTest.test_sponsor()
EighthTest.test_switch_cancelled_sticky()
EighthTest.test_total_capacity()
EighthTest.test_true_capacity()
- intranet.apps.eighth.tests.test_monitoring module
- intranet.apps.eighth.tests.test_profile module
- intranet.apps.eighth.tests.test_routers module
- intranet.apps.eighth.tests.test_signup module
EighthSignupTest
EighthSignupTest.test_add_user_method()
EighthSignupTest.test_eighth_location_view()
EighthSignupTest.test_eighth_multi_signup_view()
EighthSignupTest.test_eighth_signup_view()
EighthSignupTest.test_set_sticky_students()
EighthSignupTest.test_signup_restricitons()
EighthSignupTest.test_signup_user_view()
EighthSignupTest.test_toggle_favorite_view()
EighthSignupTest.test_user_stickied()
- 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.hybrid 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
EighthAttendanceSelectScheduledActivityWizard
EighthAttendanceSelectScheduledActivityWizard.FORMS
EighthAttendanceSelectScheduledActivityWizard.TEMPLATES
EighthAttendanceSelectScheduledActivityWizard.done()
EighthAttendanceSelectScheduledActivityWizard.get_context_data()
EighthAttendanceSelectScheduledActivityWizard.get_form_kwargs()
EighthAttendanceSelectScheduledActivityWizard.get_template_names()
accept_all_passes_view()
accept_pass_view()
admin_choose_scheduled_activity_view()
generate_roster_pdf()
raw_roster_view()
should_show_activity_list()
take_attendance_view()
teacher_choose_scheduled_activity_view()
- 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:
SimpleHistoryAdmin
- list_display = ('name', 'special', 'administrative', 'deleted', 'sticky', 'wed_a', 'wed_b', 'fri_a', 'fri_b')¶
- list_filter = ('special', 'administrative', 'deleted', 'sticky', 'wed_a', 'wed_b', 'fri_a', 'fri_b')¶
- ordering = ('name',)¶
- search_fields = ('name',)¶
- class intranet.apps.eighth.admin.EighthBlockAdmin(model, admin_site)[source]¶
Bases:
SimpleHistoryAdmin
- list_display = ('date', 'block_letter', 'comments', 'signup_time', 'locked')¶
- list_filter = ('locked',)¶
- ordering = ('-date', 'block_letter')¶
- class intranet.apps.eighth.admin.EighthRoomAdmin(model, admin_site)[source]¶
Bases:
SimpleHistoryAdmin
- list_display = ('name', 'capacity', 'available_for_eighth')¶
- ordering = ('name',)¶
- search_fields = ('name',)¶
- class intranet.apps.eighth.admin.EighthScheduledActivityAdmin(model, admin_site)[source]¶
Bases:
SimpleHistoryAdmin
- list_display = ('activity', 'block', 'comments', 'admin_comments', 'cancelled', 'attendance_taken')¶
- list_filter = ('attendance_taken', 'cancelled', 'block')¶
- ordering = ('-block', 'activity__name')¶
- search_fields = ('activity__name',)¶
- class intranet.apps.eighth.admin.EighthSignupAdmin(model, admin_site)[source]¶
Bases:
SimpleHistoryAdmin
- list_display = ('user', 'get_activity', 'get_block', 'after_deadline', 'was_absent')¶
- list_filter = ('was_absent', 'after_deadline', 'scheduled_activity__block', 'scheduled_activity__activity')¶
- ordering = ('-scheduled_activity__block', 'user__username')¶
- raw_id_fields = ('user', 'scheduled_activity')¶
- search_fields = ('user__username', 'user__first_name', 'user__last_name', 'scheduled_activity__activity__name')¶
- class intranet.apps.eighth.admin.EighthSponsorAdmin(model, admin_site)[source]¶
Bases:
SimpleHistoryAdmin
- list_display = ('first_name', 'last_name', 'user', 'department', 'full_time', 'contracted_eighth', 'online_attendance', 'show_full_name')¶
- list_filter = ('department', 'full_time', 'contracted_eighth', 'online_attendance', 'show_full_name')¶
- ordering = ('last_name', 'first_name')¶
- search_fields = ('first_name', 'last_name', 'user__username')¶
intranet.apps.eighth.context_processors module¶
- intranet.apps.eighth.context_processors.absence_count(request)[source]¶
Add the absence count to the context for students.
- Parameters:
request – The request object
- Returns:
Number of absences that a student has if a student, an empty dictionary otherwise.
intranet.apps.eighth.exceptions module¶
- intranet.apps.eighth.exceptions.m¶
alias of
Message
intranet.apps.eighth.models module¶
- class intranet.apps.eighth.models.AbstractBaseEighthModel(*args, **kwargs)[source]¶
Bases:
Model
Abstract base model that includes created and last modified times. .. attribute:: created_time
The time the model was created
- type:
datetime
- last_modified_time¶
The time the model was last modified.
- Type:
datetime
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.models.EighthActivity(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents an eighth period activity. .. attribute:: name
The name of the activity, max length 100 characters.
- type:
str
- description¶
The description of the activity, shown on the signup page below the other information. Information on an EighthScheduledActivity basis can be found in the “comments” field of that model. Max length 2000 characters.
- Type:
- 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 2 days of the day that the activity is scheduled.
- Type:
- one_a_day¶
If True, a student can only sign up for one instance of this activity per day.
- 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¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- admin_comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- administrative¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- announcement_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.
- 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.
- club_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.
- 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: Union[QuerySet, Collection[User]]¶
Return a QuerySet of user id’s and counts that have signed up for this activity more than settings.SIMILAR_THRESHOLD times. This is used for suggesting activities to users. :returns: A QuerySet of users who attend this activity frequently.
- freshmen_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fri_a¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fri_b¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_active_schedulings() Union[QuerySet, Collection[EighthScheduledActivity]] [source]¶
Returns all EighthScheduledActivitys scheduled this year for this activity. :returns: EighthScheduledActivitys of this activity occurring this year.
- groups_allowed¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property is_active: bool¶
Returns whether an activity is “active.” An activity is considered to be active if it has been scheduled at all this year.
- Returns:
Whether the activity is active.
- property is_popular: bool¶
Returns whether this activity has more than
settings.SIMILAR_THRESHOLD * 2
frequent_users. :returns: Whether this activity has more thansettings.SIMILAR_THRESHOLD * 2
frequent_users.
- juniors_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property name_with_flags: str¶
Return the activity name with special, both blocks, restricted, administrative, sticky, and deleted flags. :returns: The activity name with all flags.
- property name_with_flags_no_restricted: str¶
Returns the activity’s name with flags. These flags indicate whether the activity is special, both blocks, administrative, sticky, and/or cancelled.
- Returns:
The activity name with all flags except the “restricted” flag.
- objects = <django.db.models.manager.Manager object>¶
- officers¶
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.
- one_a_day¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- presign¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- restricted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod restricted_activities_available_to_user(user: User) List[int] [source]¶
Finds the restricted activities available to the given user. :param user: The User to find the restricted activities for.
- Returns:
The restricted activities available to the user.
- rooms¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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.
- subscribers¶
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.
- subscriptions_enabled¶
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(*args, **kwargs)[source]¶
Bases:
Manager
- class intranet.apps.eighth.models.EighthActivitySimilarity(id, created_time, last_modified_time, count, weighted)[source]¶
Bases:
AbstractBaseEighthModel
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- activity_set¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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.
- class intranet.apps.eighth.models.EighthActivity_club_sponsors(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthActivity_favorites(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthActivity_groups_allowed(id, eighthactivity, group)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- group¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- group_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthActivity_officers(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthActivity_rooms(id, eighthactivity, eighthroom)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- eighthroom¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthroom_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthActivity_similarities(id, eighthactivity, eighthactivitysimilarity)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- eighthactivitysimilarity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivitysimilarity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthActivity_sponsors(id, eighthactivity, eighthsponsor)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- eighthsponsor¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthsponsor_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthActivity_subscribers(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthActivity_users_allowed(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthActivity_users_blacklisted(id, eighthactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthBlock(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents an eighth period block. .. attribute:: date
The date of the block.
- signup_time¶
The recommended time at which all users should sign up. This does not prevent people from signing up at this time, however students will see the amount of time left to sign up. Defaults to 12:40.
- block_letter¶
The block letter (e.g. A, B, A1, A2, SOL). Despite its name, it can now be more than just a letter.
- locked¶
Whether signups are closed.
- activities¶
List of
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¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- activities¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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: str¶
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[QuerySet, Collection[User]] [source]¶
Return a QuerySet of people who haven’t signed up for an activity during this block. :returns: The users who have not signed up for an activity during this block.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- property hybrid_text: str¶
- Returns the user friendly name of a hybrid block. See Hybrid-README.rst.
P1 and * - P2 are returned as * (In-Person)
Virt is returned as * (Virtual)
Any other names are returned as themselves.
- Returns:
The user friendly name of a hybrid block.
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- in_clear_absence_period() bool [source]¶
Returns whether today’s date is within the block’s clear absence period. This determines whether the option to clear an eighth period absence should be shown. If the block is not within the clear absence period, an absence cannot be cleared. :returns: Whether the current date is in the block’s clear absence period.
- property is_this_year: bool¶
Return whether the block occurs during this school year. :returns: Whether the block occurs during this school year.
- is_today() bool [source]¶
Returns whether the block occurs today. :returns: Whether the block occurs today.
- property letter_width: int¶
Returns the width in pixels that should be allocated for the block_letter on the signup page. :returns: The width in pixels of the block letter.
- locked¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- next_blocks(quantity: int = -1) Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets future blocks this school year in order. :param quantity: The number of blocks to list after this block, or -1 for all following blocks.
- Returns:
A QuerySet with the specified number of future blocks this school year. If
quantity
is passed, then the QuerySet will not be filter()-able.
- num_no_signups() int [source]¶
Gets how many people have not signed up for an activity this block. :returns: The number of people who have not signed up for an activity during this block.
- num_signups() int [source]¶
Gets how many people have signed up for an activity this block. :returns: The number of people who have signed up for an activity during this block.
- objects = <intranet.apps.eighth.models.EighthBlockManager object>¶
- override_blocks¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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[QuerySet, Collection[EighthBlock]] [source]¶
Gets the previous blocks this school year in order. :param quantity: The number of blocks to list before this block, or -1 for all previous blocks.
- Returns:
If quantity is not passed, returns 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: str¶
- Returns the date and block letter for this block.
It is returned in the format of MM/DD B, like “9/1 B”
- Returns:
The date and block letter.
- signup_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.models.EighthBlockManager(*args, **kwargs)[source]¶
Bases:
Manager
- get_blocks_this_year() Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets a QuerySet of blocks that occur this school year. :returns: A QuerySet of all the blocks that occur during this school year.
- get_blocks_today() Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets a QuerySet of blocks that occur today. :returns: A QuerySet of all the blocks that occur today.
- get_first_upcoming_block() EighthBlock [source]¶
Gets the first upcoming block (the first block that will take place in the future). :returns: The first upcoming
EighthBlock
object, orNone
if there are none upcoming.
- get_next_upcoming_blocks() Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets the next upccoming blocks. It finds the other blocks that are occurring on the day of the first upcoming block. :returns: A QuerySet of the next upcoming
EighthBlock
objects.
- get_upcoming_blocks(max_number: int = -1) Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets the given number of upcoming blocks that will take place in the future. If there is no block in the future, the most recent block will be returned. :returns: A QuerySet of the X upcoming
EighthBlock
objects.
- class intranet.apps.eighth.models.EighthBlockQuerySet(model=None, query=None, using=None, hints=None)[source]¶
Bases:
QuerySet
- filter_today() Union[QuerySet, Collection[EighthBlock]] [source]¶
Gets EighthBlocks that occur today. :returns: A QuerySet containing all of the blocks selected by this QuerySet that occur today.
- this_year() Union[QuerySet, Collection[EighthBlock]] [source]¶
Get EighthBlocks from this school year only. :returns: A QuerySet containing all of the blocks selected by this QuerySet that occur during this school year.
- class intranet.apps.eighth.models.EighthBlock_override_blocks(id, from_eighthblock, to_eighthblock)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- from_eighthblock¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- from_eighthblock_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- to_eighthblock¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- to_eighthblock_id¶
- class intranet.apps.eighth.models.EighthRoom(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents a room in which an eighth period activity can be held. .. attribute:: name
The name of the room.
- type:
str
- capacity¶
The maximum capacity of the room (-1 for unlimited, 0 to prevent student signup)
- Type:
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- available_for_eighth¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- capacity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- eighthactivity_set¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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: str¶
The formatted name of the room. If it looks like the room is a numbered room – the name starts with either a number or with the text “Room” – returns “Rm. <room number>.” :returns: The formatted name of the Room.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- save_without_historical_record(*args, **kwargs)¶
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- static total_capacity_of_rooms(rooms: Iterable[EighthRoom]) int [source]¶
Returns the total capacity of the provided rooms. :param rooms: Rooms to determine total capacity for.
- Returns:
The total capacity of the provided rooms.
- unique_together = (('name', 'capacity'),)¶
- class intranet.apps.eighth.models.EighthScheduledActivity(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents the relationship between an activity and a block in which it has been scheduled. .. attribute:: block
EighthBlock
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¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- activity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- activity_id¶
- add_user(user: AbstractBaseUser, request: Optional[HttpRequest] = None, force: bool = False, no_after_deadline: bool = False, add_to_waitlist: bool = False)[source]¶
Signs up a user to this scheduled activity if possible. This is where the magic happens. Raises an exception if there’s a problem signing the user up unless the signup is forced and the requesting user has permission. :param user: The user to add to the scheduled activity. :param request: The request object associated with the signup action. Should always be passed if applicable,
as some information is extracted from the request.
- Parameters:
force – Whether to force the signup.
no_after_deadline – Whether to mark the user as not having signed up after the deadline, regardless of whether they did or not.
add_to_waitlist – Explicitly add the user to the waitlist.
- admin_comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- administrative¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- archived_member_count¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- attendance_taken¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- block¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- block_id¶
- both_blocks¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cancel()[source]¶
Cancel an EighthScheduledActivity and send a notification email to signed-up students. This method should be always be called instead of setting the ‘cancelled’ flag manually. (Note: To avoid spamming students signed up for both-block activities, an email is not sent for the B-block activity in both-block activities.)
- cancelled¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- capacity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- eighthsignup_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is 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: str¶
Gets the full title for the activity, appending the title of the scheduled activity to the activity’s name. :returns: The full title for the scheduled activity, without flags.
- get_administrative() bool [source]¶
Returns whether this scheduled activity is administrative. :returns: Whether this activity is administrative
- get_all_associated_rooms() Union[QuerySet, Collection[EighthRoom]] [source]¶
Returns a QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity. :returns: A QuerySet of all the rooms associated with either this EighthScheduledActivity or its EighthActivity.
- get_both_blocks_sibling() Optional[EighthScheduledActivity] [source]¶
If this is a both-blocks activity, get the other EighthScheduledActivity object that occurs on the other block. both_blocks means A and B block, NOT all of the blocks on that day. :returns: EighthScheduledActivity object if found.
None
, if the activity cannot have a sibling.
- get_finance() str [source]¶
Retrieves the name of this activity’s account with the finance office, if any. :returns: The name of this activity’s account with the finance office.
Returns a QuerySet of the members that you do not have permission to view. :param user: The user who is attempting to view the member list.
- Returns:
Unsorted QuerySet of the members that you do not have permission to view.
- get_restricted() bool [source]¶
Gets whether this scheduled activity is restricted. :returns: Whether this scheduled activity is restricted.
- get_special() bool [source]¶
Returns whether this scheduled activity is special. :returns: Whether this scheduled activity is special.
- get_true_capacity() int [source]¶
Retrieves the capacity for the scheduled activity, taking into account activity defaults and overrides. :returns: The true capacity of the scheduled activity.
- get_true_rooms() Union[QuerySet, Collection[EighthRoom]] [source]¶
Retrieves the rooms for the scheduled activity, taking into account activity defaults and overrides. :returns: The true room list of the scheduled activity.
- get_true_sponsors() Union[QuerySet, Collection[EighthSponsor]] [source]¶
Retrieves the sponsors for the scheduled activity, taking into account activity defaults and overrides. :returns: The sponsors for this scheduled activity.
- get_viewable_members(user: Optional[User] = None) Union[QuerySet, Collection[User]] [source]¶
Returns a QuerySet of the members that you have permission to view, sorted alphabetically. :param user: The user who is attempting to view the member list.
- Returns:
QuerySet of the members that you have permission to view, sorted alphabetically.
- get_viewable_members_serializer(request) Union[QuerySet, Collection[User]] [source]¶
Given a request, returns an unsorted QuerySet of the members that the requesting user has permission to view. :param request: The request object associated with the member list query.
- Returns:
Unsorted QuerySet of the members that you have permission to view.
- has_open_passes() bool [source]¶
Returns whether there are passes that have not been acknowledged. :returns: Whether this activity has open passes.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_activity_sticky() bool [source]¶
Check if the scheduled activity or activity is sticky
Warning
This method does NOT take into account individual user stickies. In 99.9% of cases, you should use
is_user_stickied()
instead.
- is_almost_full() bool [source]¶
Returns whether the scheduled activity is almost full (>=90%). :returns: Whether this scheduled activity is at least 90% full.
- is_both_blocks() bool [source]¶
Gets whether this scheduled activity runs both blocks. :returns: Whether this scheduled activity runs both blocks.
- is_full(nocache: bool = False) bool [source]¶
Returns whether the scheduled activity is full. :param nocache: Whether to disable caching for the query that checks the scheduled activity’s
current capacity.
- Returns:
Whether this scheduled activity is full.
- is_overbooked() bool [source]¶
Returns whether the activity is overbooked (>100%) capacity. :returns: Whether this scheduled activity is overbooked.
- is_too_early_to_signup(now: ~typing.Optional[~datetime.datetime] = None) -> (<class 'bool'>, <module 'datetime' from '/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/datetime.py'>)[source]¶
Returns whether it is too early to sign up for the activity if it is a presign. This contains the 2 day pre-signup logic. :param now: A datetime object to use for the check instead of the current time.
- Returns:
Whether it is too early to sign up for this scheduled activity and when the activity opens for signups.
- is_user_stickied(user: AbstractBaseUser) bool [source]¶
Check if the given user is stickied to this activity.
- Parameters:
user – The user to check for stickiness.
- 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. :param waitlists: The EighthWaitlist objects whose users should be notified that the activity has an open slot.
- objects = <intranet.apps.eighth.models.EighthScheduledActivityManager object>¶
- restricted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- rooms¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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.
- set_sticky_students(users: Sequence[AbstractBaseUser]) None [source]¶
Sets the given users to the sticky students list for this activity.
This also sends emails to students.
- Parameters:
users – The users to add to the sticky students list.
- Returns:
A tuple of the new stickied students and the unstickied students.
- 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.
- sticky_students¶
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.
- title¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property title_with_flags: str¶
Gets the title for the activity, appending the title of the scheduled activity to the activity’s name and flags. :returns: The full title for the scheduled activity, with flags.
- uncancel()[source]¶
Uncancel an EighthScheduledActivity. This does nothing besides unset the cancelled flag and save the object.
- user_is_sponsor(user: User) bool [source]¶
Returns whether the given user is a sponsor of the activity. :param user: The user to check for sponsorship of this activity.
- Returns:
Whether the given user is a sponsor of the activity.
- waitlist¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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(*args, **kwargs)[source]¶
Bases:
Manager
Model Manager for EighthScheduledActivity.
- for_sponsor(sponsor: EighthSponsor, include_cancelled: bool = False) Union[QuerySet, Collection[EighthScheduledActivity]] [source]¶
Returns a QuerySet of EighthScheduledActivities where the given EighthSponsor is sponsoring. If a sponsorship is defined in an EighthActivity, it may be overridden on a block by block basis in an EighthScheduledActivity. Sponsors from the EighthActivity do not carry over. EighthScheduledActivities that are deleted or cancelled are also not counted. :param sponsor: The sponsor to search for. :param include_cancelled: Whether to include cancelled activities. Deleted
activities are always excluded.
- Returns:
- A QuerySet of EighthScheduledActivities where the given EighthSponsor
is sponsoring.
- class intranet.apps.eighth.models.EighthScheduledActivity_rooms(id, eighthscheduledactivity, eighthroom)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthroom¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthroom_id¶
- eighthscheduledactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthscheduledactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthScheduledActivity_sponsors(id, eighthscheduledactivity, eighthsponsor)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthscheduledactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthscheduledactivity_id¶
- eighthsponsor¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthsponsor_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- class intranet.apps.eighth.models.EighthScheduledActivity_sticky_students(id, eighthscheduledactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- eighthscheduledactivity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- eighthscheduledactivity_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- 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¶
- class intranet.apps.eighth.models.EighthSignup(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents a signup/membership in an eighth period activity. .. attribute:: user
The
User
who has signed up.- scheduled_activity¶
The
EighthScheduledActivity
for which the user has signed up.
- after_deadline¶
Whether the signup was after deadline.
- previous_activity_name¶
The name of the activity the student was previously signed up for (used for passes)
- previous_activity_sponsors¶
The sponsors of the activity the student was previously signed up for.
- pass_accepted¶
Whether the pass was accepted
- was_absent¶
Whether the student was absent.
- absence_acknowledged¶
Whether the student has dismissed the absence notification.
- absence_emailed¶
Whether the student has been emailed about the absence.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- absence_acknowledged¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- absence_emailed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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. :param nocache: Whether to explicitly disable caching for this check.
- Returns:
Whether there is another EighthSignup for the same user in the same block.
- history = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- in_clear_absence_period() bool [source]¶
Returns whether the block for this signup is in the clear absence period. :returns: Whether the block for this signup is in the clear absence period.
- objects = <intranet.apps.eighth.models.EighthSignupManager object>¶
- own_signup¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- pass_accepted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- previous_activity_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- previous_activity_sponsors¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- remove_signup(user: Optional[User] = None, force: bool = False, dont_run_waitlist: bool = False) str [source]¶
Attempts to remove the EighthSignup if the user has permission to do so. :param user: The user who is attempting to remove the EighthSignup. :param force: Whether to force removal. :param dont_run_waitlist: Whether to skip notifying users on the activity’s waitlist.
- Returns:
A message to be displayed to the user indicating successful removal.
- save_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¶
- 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¶
- validate_unique(*args, **kwargs)[source]¶
Checked whether more than one EighthSignup exists for a User on a given EighthBlock.
- was_absent¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.models.EighthSignupManager(*args, **kwargs)[source]¶
Bases:
Manager
Model manager for EighthSignup.
- create_signup(user: User, scheduled_activity: EighthScheduledActivity, **kwargs) EighthSignup [source]¶
Creates an EighthSignup for the given user in the given activity after checking for duplicate signups. This raises an error if there are duplicate signups. :param user: The user to create the EighthSignup for. :param scheduled_activity: The EighthScheduledActivity to sign the user up for.
- get_absences() Union[QuerySet, Collection[EighthSignup]] [source]¶
Returns all EighthSignups for which the student was marked as absent. :returns: A QuerySet of all the EighthSignups for which the student was marked as absent.
- class intranet.apps.eighth.models.EighthSponsor(*args, **kwargs)[source]¶
Bases:
AbstractBaseEighthModel
Represents a sponsor for an eighth period activity. A sponsor could be linked to an actual user or just a name. .. attribute:: first_name
The first name of the sponsor.
- type:
str
- 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¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- contracted_eighth¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- department¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- eighthactivity_set¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
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 = <django.db.models.manager.HistoryManagerFromHistoricalQuerySet object>¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property name: str¶
If show_full_name is set, returns “last name, first name”. Otherwise, returns last name only. :returns: The name to display for the sponsor, omitting the first name unless explicitly requested.
- objects = <django.db.models.manager.Manager object>¶
- online_attendance¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save_without_historical_record(*args, **kwargs)¶
Save model without saving a historical record
Make sure you know what you’re doing before you use this method.
- show_full_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property to_be_assigned: bool¶
Returns True if the sponsor’s name contains “to be assigned” or similar. :returns: Whether the sponsor is a “to be assigned” sponsor.
- user¶
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthWaitlist(id, created_time, last_modified_time, time, user, block, scheduled_activity)[source]¶
Bases:
AbstractBaseEighthModel
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- block¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- block_id¶
- get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
- get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <intranet.apps.eighth.models.EighthWaitlistManager object>¶
- scheduled_activity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- scheduled_activity_id¶
- time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- class intranet.apps.eighth.models.EighthWaitlistManager(*args, **kwargs)[source]¶
Bases:
Manager
Model manager for EighthWaitlist.
- check_for_prescence(activity: EighthScheduledActivity, user: User) bool [source]¶
Returns whether the given user is in a waitlist for the given activity. :param activity: The activity for which the waitlist should be queried. :param user: The user who should be searched for in the activity’s waitlist.
- Returns:
Whether the given user is in a waitlist for the given activity.
- get_next_waitlist(activity: EighthScheduledActivity) Union[QuerySet, Collection[EighthWaitlist]] [source]¶
Returns a QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time. :param activity: The activity to list the EighthWaitlist objects for.
- Returns:
A QuerySet of all the EighthWaitlist objects for the given activity, ordered by signup time.
- position_in_waitlist(aid: int, uid: int) int [source]¶
Given an activity ID and a user ID, returns the user’s position in the waitlist (starting at 1). If the user is not in the waitlist, returns 0. :param aid: The ID of the EighthScheduledActivity for which the waitlist should be queried. :param uid: The ID of the user whose position in the waitlist should be found.
- Returns:
The user’s position in the waitlist, starting at 1, or 0 if the user is not in the waitlist.
intranet.apps.eighth.notifications module¶
- intranet.apps.eighth.notifications.activity_cancelled_email(sched_act: EighthScheduledActivity)[source]¶
Notifies all the users signed up for the given EighthScheduledActivity that it has been cancelled.
- Parameters:
sched_act – The activity that has been cancelled.
intranet.apps.eighth.serializers module¶
- class intranet.apps.eighth.serializers.EighthActivityDetailSerializer(*args, **kwargs)[source]¶
Bases:
HyperlinkedModelSerializer
- class intranet.apps.eighth.serializers.EighthActivityListSerializer(*args, **kwargs)[source]¶
Bases:
HyperlinkedModelSerializer
- class intranet.apps.eighth.serializers.EighthAddSignupSerializer(*args, **kwargs)[source]¶
Bases:
Serializer
- class intranet.apps.eighth.serializers.EighthBlockDetailSerializer(*args, **kwargs)[source]¶
Bases:
Serializer
- class intranet.apps.eighth.serializers.EighthBlockListSerializer(*args, **kwargs)[source]¶
Bases:
HyperlinkedModelSerializer
- class intranet.apps.eighth.serializers.EighthScheduledActivitySerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer
- class intranet.apps.eighth.serializers.EighthSignupSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer
- class intranet.apps.eighth.serializers.EighthToggleFavoriteSerializer(*args, **kwargs)[source]¶
Bases:
Serializer
intranet.apps.eighth.tasks module¶
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, subscriptions_enabled, admin_comments, deleted, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- admin_comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- administrative¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- both_blocks¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- default_capacity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- finance¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- freshmen_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fri_a¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- fri_b¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthActivity
- juniors_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- one_a_day¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- presign¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property prev_record¶
Get the previous history record for the instance. None if first.
- restricted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- revert_url()¶
URL for this change in the default admin site.
- seniors_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sophomores_allowed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- special¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sticky¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- subscriptions_enabled¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- wed_a¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- wed_b¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.HistoricalEighthBlock(id, created_time, last_modified_time, date, signup_time, block_letter, locked, comments, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- block_letter¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_previous_by_date(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthBlock
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- locked¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- property prev_record¶
Get the previous history record for the instance. None if first.
- revert_url()¶
URL for this change in the default admin site.
- signup_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.HistoricalEighthRoom(id, created_time, last_modified_time, name, capacity, available_for_eighth, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- available_for_eighth¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- capacity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthRoom
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- property prev_record¶
Get the previous history record for the instance. None if first.
- revert_url()¶
URL for this change in the default admin site.
- class intranet.apps.eighth.HistoricalEighthScheduledActivity(id, created_time, last_modified_time, admin_comments, title, comments, capacity, both_blocks, special, administrative, restricted, sticky, attendance_taken, cancelled, archived_member_count, block, activity, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- activity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- activity_id¶
- admin_comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- administrative¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- archived_member_count¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- attendance_taken¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- block¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- block_id¶
- both_blocks¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cancelled¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- capacity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- comments¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthScheduledActivity
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- property prev_record¶
Get the previous history record for the instance. None if first.
- restricted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- revert_url()¶
URL for this change in the default admin site.
- special¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- sticky¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.HistoricalEighthSignup(id, created_time, last_modified_time, time, after_deadline, previous_activity_name, previous_activity_sponsors, pass_accepted, was_absent, absence_acknowledged, absence_emailed, archived_was_absent, own_signup, user, scheduled_activity, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- absence_acknowledged¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- absence_emailed¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- after_deadline¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- archived_was_absent¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_next_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- get_previous_by_time(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthSignup
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- own_signup¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- pass_accepted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property prev_record¶
Get the previous history record for the instance. None if first.
- previous_activity_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- previous_activity_sponsors¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- revert_url()¶
URL for this change in the default admin site.
- scheduled_activity¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- scheduled_activity_id¶
- time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶
- was_absent¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class intranet.apps.eighth.HistoricalEighthSponsor(id, created_time, last_modified_time, first_name, last_name, department, full_time, online_attendance, contracted_eighth, show_full_name, user, history_id, history_date, history_change_reason, history_type, history_user)¶
Bases:
HistoricalChanges
,Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- contracted_eighth¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- department¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- first_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- full_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- static get_default_history_user(instance)¶
Returns the user specified by get_user method for manually creating historical objects
- get_department_display(*, field=<django.db.models.fields.CharField: department>)¶
- get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)¶
- get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)¶
- get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)¶
- history_change_reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history_user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- history_user_id¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property instance¶
- instance_type¶
alias of
EighthSponsor
- last_modified_time¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property next_record¶
Get the next history record for the instance. None if last.
- objects = <django.db.models.manager.Manager object>¶
- online_attendance¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property prev_record¶
Get the previous history record for the instance. None if first.
- revert_url()¶
URL for this change in the default admin site.
- show_full_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id¶