intranet.apps.schedule package

Submodules

intranet.apps.schedule.admin module

intranet.apps.schedule.api module

class intranet.apps.schedule.api.DayDetail(**kwargs)[source]

Bases: rest_framework.generics.RetrieveAPIView

get_object()[source]
lookup_field = 'date'
permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)
queryset
serializer_class

alias of intranet.apps.schedule.serializers.DaySerializer

class intranet.apps.schedule.api.DayList(**kwargs)[source]

Bases: rest_framework.generics.ListAPIView

get_queryset()[source]
pagination_class

alias of OnePagePagination

permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)
serializer_class

alias of intranet.apps.schedule.serializers.DaySerializer

class intranet.apps.schedule.api.OnePagePagination[source]

Bases: rest_framework.pagination.PageNumberPagination

max_page_size = 7
page_size = 1
page_size_query_param = 'page_size'

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: django.forms.models.ModelForm

class Meta[source]

Bases: object

fields = ['date', 'day_type']
model

alias of intranet.apps.schedule.models.Day

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: django.forms.models.ModelForm

class Meta[source]

Bases: object

fields = ['name', 'special', 'codenames', 'blocks']
model

alias of intranet.apps.schedule.models.DayType

declared_fields = {}

intranet.apps.schedule.models module

class intranet.apps.schedule.models.Block(id, name, start, end, order)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ForwardManyToOneDescriptor instance.

end_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ForwardManyToOneDescriptor instance.

start_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class intranet.apps.schedule.models.CodeName(id, name)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 a ForwardManyToOneDescriptor instance.

day_type_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.DayManager[source]

Bases: django.db.models.manager.Manager

get_future_days()[source]

Return only future Day objects.

today()[source]

Return the Day for the current day

class intranet.apps.schedule.models.DayType(id, name, special)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property 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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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

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.

property start_time

Returns Time the school day begins. Returns None if there are no blocks.

Returns

The Time at which the school day starts, or None if there are no blocks.

class intranet.apps.schedule.models.DayType_blocks(id, daytype, block)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

block

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

block_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ForwardManyToOneDescriptor instance.

daytype_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.schedule.models.DayType_codenames(id, daytype, codename)

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 a ForwardManyToOneDescriptor instance.

codename_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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 a ForwardManyToOneDescriptor instance.

daytype_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
class intranet.apps.schedule.models.Time(id, hour, minute)[source]

Bases: django.db.models.base.Model

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

date_obj(date)[source]
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>
str_12_hr()[source]

intranet.apps.schedule.notifications module

intranet.apps.schedule.notifications.at_period_point(blocks)[source]
intranet.apps.schedule.notifications.chrome_getdata_check(request)[source]
intranet.apps.schedule.notifications.period_start_end_data(request)[source]

intranet.apps.schedule.serializers module

class intranet.apps.schedule.serializers.BlockSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('order', 'name', 'start', 'end')
model

alias of intranet.apps.schedule.models.Block

class intranet.apps.schedule.serializers.DaySerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('url', 'date', 'day_type')
model

alias of intranet.apps.schedule.models.Day

class intranet.apps.schedule.serializers.DayTypeSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('name', 'special', 'blocks')
model

alias of intranet.apps.schedule.models.DayType

class intranet.apps.schedule.serializers.TimeSerializer(instance=None, data=<class 'rest_framework.fields.empty'>, **kwargs)[source]

Bases: rest_framework.serializers.ModelSerializer

class Meta[source]

Bases: object

fields = ('hour', 'minute')
model

alias of intranet.apps.schedule.models.Time

intranet.apps.schedule.tests module

class intranet.apps.schedule.tests.ScheduleTest(methodName='runTest')[source]

Bases: intranet.test.ion_test.IonTestCase

Tests schedules.

test_day()[source]

intranet.apps.schedule.urls module

intranet.apps.schedule.views module

intranet.apps.schedule.views.calendar_view(request)[source]
intranet.apps.schedule.views.date_format(date)[source]
intranet.apps.schedule.views.decode_date(date)[source]
intranet.apps.schedule.views.delete_cache()[source]
intranet.apps.schedule.views.get_day_data(firstday, daynum)[source]
intranet.apps.schedule.views.is_weekday(date)[source]
intranet.apps.schedule.views.month_data(request)[source]
intranet.apps.schedule.views.schedule_context(request=None, date=None, use_cache=True, show_tomorrow=True)[source]
intranet.apps.schedule.views.schedule_embed(request)[source]
intranet.apps.schedule.views.schedule_view(request)[source]
intranet.apps.schedule.views.schedule_widget_view(request)[source]
intranet.apps.schedule.views.week_data(request, date=None)[source]

Module contents