intranet.apps.eighth.views package

Submodules

intranet.apps.eighth.views.activities module

intranet.apps.eighth.views.activities.calculate_statistics(activity, start_date=None, all_years=False, year=None, future=False)[source]
intranet.apps.eighth.views.activities.chunks(items, n)[source]
intranet.apps.eighth.views.activities.current_school_year()[source]
intranet.apps.eighth.views.activities.generate_statistics_pdf(activities=None, start_date=None, all_years=False, year=None)[source]

Accepts EighthActivity objects and outputs a PDF file.

intranet.apps.eighth.views.api module

class intranet.apps.eighth.views.api.BlockPagination[source]

Bases: rest_framework.pagination.PageNumberPagination

max_page_size = 200
page_size = 50
page_size_query_param = 'page_size'
class intranet.apps.eighth.views.api.EighthActivityDetail(**kwargs)[source]

Bases: rest_framework.generics.RetrieveAPIView

API endpoint that shows details of an eighth activity.

permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthActivityDetailSerializer

class intranet.apps.eighth.views.api.EighthActivityList(**kwargs)[source]

Bases: rest_framework.generics.ListAPIView

permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthActivityListSerializer

class intranet.apps.eighth.views.api.EighthBlockDetail(**kwargs)[source]

Bases: rest_framework.views.APIView

API endpoint that shows details for an eighth block.

get(request, pk)[source]
permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
class intranet.apps.eighth.views.api.EighthBlockList(**kwargs)[source]

Bases: rest_framework.generics.ListAPIView

API endpoint that lists all eighth blocks.

get_queryset()[source]
is_valid_date(date_text)[source]
pagination_class

alias of BlockPagination

permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
serializer_class

alias of intranet.apps.eighth.serializers.EighthBlockListSerializer

class intranet.apps.eighth.views.api.EighthScheduledActivitySignupList(**kwargs)[source]

Bases: rest_framework.views.APIView

API endpoint that lists all signups for a certain scheduled activity.

get(request, scheduled_activity_id)[source]
class intranet.apps.eighth.views.api.EighthSignupDetail(**kwargs)[source]

Bases: rest_framework.generics.RetrieveAPIView

API endpoint that shows details of an eighth signup.

queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthSignupSerializer

class intranet.apps.eighth.views.api.EighthUserFavoritesAdd(**kwargs)[source]

Bases: rest_framework.generics.CreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthActivityDetailSerializer

class intranet.apps.eighth.views.api.EighthUserFavoritesListToggle(**kwargs)[source]

Bases: rest_framework.generics.ListCreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
list(request)[source]
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthToggleFavoriteSerializer

class intranet.apps.eighth.views.api.EighthUserFavoritesRemove(**kwargs)[source]

Bases: rest_framework.generics.ListCreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
list(request)[source]
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthActivityListSerializer

class intranet.apps.eighth.views.api.EighthUserSignupListAdd(**kwargs)[source]

Bases: rest_framework.generics.ListCreateAPIView

create(request, user_id=None)[source]
is_valid_date(date_text)[source]
list(request, user_id=None)[source]
queryset
serializer_class

alias of intranet.apps.eighth.serializers.EighthAddSignupSerializer

class intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials[source]

Bases: rest_framework.permissions.BasePermission

has_permission(request, view)[source]

intranet.apps.eighth.views.attendance module

class intranet.apps.eighth.views.attendance.EighthAttendanceSelectScheduledActivityWizard(**kwargs)[source]

Bases: formtools.wizard.views.SessionWizardView

FORMS = [('block', <class 'intranet.apps.eighth.forms.admin.blocks.BlockSelectionForm'>), ('activity', <class 'intranet.apps.eighth.forms.admin.activities.ActivitySelectionForm'>)]
TEMPLATES = {'activity': 'eighth/take_attendance.html', 'block': 'eighth/take_attendance.html'}
done(form_list, **kwargs)[source]
get_context_data(form, **kwargs)[source]
get_form_kwargs(step=None)[source]
get_template_names()[source]
intranet.apps.eighth.views.attendance.accept_all_passes_view(request, scheduled_activity_id)[source]
intranet.apps.eighth.views.attendance.accept_pass_view(request, signup_id)[source]
intranet.apps.eighth.views.attendance.admin_choose_scheduled_activity_view(self, request, *args, **kwargs)
intranet.apps.eighth.views.attendance.generate_roster_pdf(sched_act_ids)[source]

Generates a PDF roster for one or more.

EighthScheduledActivitys.

Args
sched_act_ids

The list of IDs of the scheduled activities to show in the PDF.

Returns a BytesIO object for the PDF.

intranet.apps.eighth.views.attendance.raw_roster_view(request, scheduled_activity_id)[source]
intranet.apps.eighth.views.attendance.should_show_activity_list(wizard)[source]
intranet.apps.eighth.views.attendance.take_attendance_view(request, scheduled_activity_id)[source]
intranet.apps.eighth.views.attendance.teacher_choose_scheduled_activity_view(self, request, *args, **kwargs)

intranet.apps.eighth.views.monitoring module

intranet.apps.eighth.views.monitoring.metrics_view(request)[source]

intranet.apps.eighth.views.profile module

intranet.apps.eighth.views.profile.date_fmt(date)[source]
intranet.apps.eighth.views.profile.get_profile_context(request, user_id=None, date=None)[source]

intranet.apps.eighth.views.routers module

Views that render different pages depending on the user that requests them.

intranet.apps.eighth.views.routers.eighth_redirect_view(request)[source]

intranet.apps.eighth.views.signup module

Module contents