intranet.apps.enrichment package¶
Submodules¶
intranet.apps.enrichment.admin module¶
- class intranet.apps.enrichment.admin.EnrichmentActivityAdmin(model, admin_site)[source]¶
Bases:
ModelAdmin
- list_display = ('title', 'location', 'time', 'capacity', 'presign', 'attendance_taken')¶
- list_filter = ('time', 'presign', 'attendance_taken')¶
- ordering = ('-time',)¶
- search_fields = ('title', 'description', 'groups_allowed__name', 'groups_blacklisted__name')¶
intranet.apps.enrichment.forms module¶
- class intranet.apps.enrichment.forms.EnrichmentActivityForm(*args, **kwargs)[source]¶
Bases:
ModelForm
- class Meta[source]¶
Bases:
object
- fields = ['title', 'description', 'time', 'location', 'capacity', 'presign', 'groups_allowed', 'groups_blacklisted']¶
- model¶
alias of
EnrichmentActivity
- declared_fields = {}¶
intranet.apps.enrichment.models module¶
- class intranet.apps.enrichment.models.EnrichmentActivity(*args, **kwargs)[source]¶
Bases:
Model
An enrichment activity available to the TJ community.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- added¶
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.
- attended¶
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.
- attending¶
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.
- capacity¶
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.
- get_next_by_added(*, field=<django.db.models.fields.DateTimeField: added>, is_next=True, **kwargs)¶
- get_previous_by_added(*, field=<django.db.models.fields.DateTimeField: added>, is_next=False, **kwargs)¶
- 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.
- groups_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.
- property happened¶
Return whether an enrichment activity has happened.
- 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_this_year¶
Return whether the enrichment activity was created after the start of the school year.
- property is_too_early_to_signup¶
Returns whether it is too early to sign up for the activity if it is a presign. This contains the 2 day presign logic.
- Returns:
Whether it is too early to sign up for this scheduled activity and when the activity opens for signups.
- location¶
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.enrichment.models.EnrichmentActivityManager object>¶
- presign¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property restricted¶
- time¶
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.
- 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_can_signup(user)[source]¶
Return whether a user can sign up for an enrichment activity.
- Parameters:
user – The user to check.
- Returns:
Whether the user can sign up for the enrichment activity.
- user_id¶
- class intranet.apps.enrichment.models.EnrichmentActivityManager(*args, **kwargs)[source]¶
Bases:
Manager
- class intranet.apps.enrichment.models.EnrichmentActivityQuerySet(model=None, query=None, using=None, hints=None)[source]¶
Bases:
QuerySet
- class intranet.apps.enrichment.models.EnrichmentActivity_attended(id, enrichmentactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- enrichmentactivity¶
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.
- enrichmentactivity_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.enrichment.models.EnrichmentActivity_attending(id, enrichmentactivity, user)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- enrichmentactivity¶
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.
- enrichmentactivity_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.enrichment.models.EnrichmentActivity_groups_allowed(id, enrichmentactivity, group)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- enrichmentactivity¶
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.
- enrichmentactivity_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.enrichment.models.EnrichmentActivity_groups_blacklisted(id, enrichmentactivity, group)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- enrichmentactivity¶
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.
- enrichmentactivity_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>¶