intranet.apps.schedule package¶
Subpackages¶
Submodules¶
intranet.apps.schedule.admin module¶
intranet.apps.schedule.api module¶
- class intranet.apps.schedule.api.DayDetail(**kwargs)[source]¶
Bases:
RetrieveAPIView
- lookup_field = 'date'¶
- permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)¶
- queryset¶
- serializer_class¶
alias of
DaySerializer
- class intranet.apps.schedule.api.DayList(**kwargs)[source]¶
Bases:
ListAPIView
- pagination_class¶
alias of
OnePagePagination
- permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)¶
- serializer_class¶
alias of
DaySerializer
intranet.apps.schedule.forms module¶
- class intranet.apps.schedule.forms.DayForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶
Bases:
ModelForm
- declared_fields = {}¶
- class intranet.apps.schedule.forms.DayTypeForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)[source]¶
Bases:
ModelForm
- declared_fields = {}¶
intranet.apps.schedule.models module¶
- class intranet.apps.schedule.models.Block(id, name, start, end, order)[source]¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- daytype_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.
- end¶
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.
- end_id¶
- 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>¶
- order¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- start¶
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.
- start_id¶
- class intranet.apps.schedule.models.CodeName(id, name)[source]¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- daytype_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.
- 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>¶
- class intranet.apps.schedule.models.Day(id, date, day_type, comment)[source]¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- comment¶
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.
- day_type¶
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.
- day_type_id¶
- property end_time¶
Return time the school day ends
- 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)¶
- 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.schedule.models.DayManager object>¶
- property start_time¶
Return time the school day begins
- class intranet.apps.schedule.models.DayType(id, name, special)[source]¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- 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.
- property class_name¶
- codenames¶
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.
- day_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 end_time: Time¶
Returns Time the school day ends. Returns None if there are no blocks.
- Returns:
The Time at which the school day ends, or None if there are no blocks.
- 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.
- property no_school: bool¶
Returns True if no blocks are scheduled.
- Returns:
Whether there are no blocks scheduled.
- objects = <django.db.models.manager.Manager object>¶
- special¶
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.schedule.models.DayType_blocks(id, daytype, block)¶
Bases:
Model
- 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¶
- daytype¶
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.
- daytype_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.schedule.models.DayType_codenames(id, daytype, codename)¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- codename¶
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.
- codename_id¶
- daytype¶
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.
- daytype_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.schedule.models.Time(id, hour, minute)[source]¶
Bases:
Model
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- blockend¶
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.
- blockstart¶
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.
- hour¶
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.
- minute¶
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>¶
intranet.apps.schedule.notifications module¶
intranet.apps.schedule.serializers module¶
- class intranet.apps.schedule.serializers.BlockSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer
- class intranet.apps.schedule.serializers.DaySerializer(*args, **kwargs)[source]¶
Bases:
HyperlinkedModelSerializer
intranet.apps.schedule.tests module¶
- class intranet.apps.schedule.tests.ApiTest(methodName='runTest')[source]¶
Bases:
IonTestCase
Tests the API views related to the schedules app
- class intranet.apps.schedule.tests.ScheduleTest(methodName='runTest')[source]¶
Bases:
IonTestCase
Tests schedules.