intranet.apps.eighth.views package

Subpackages

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.activities.settings_view(request, activity_id=None)[source]

intranet.apps.eighth.views.api module

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

Bases: PageNumberPagination

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

Bases: RetrieveAPIView

API endpoint that shows details of an eighth activity.

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

alias of EighthActivityDetailSerializer

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

Bases: ListAPIView

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

alias of EighthActivityListSerializer

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

Bases: 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: 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 EighthBlockListSerializer

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

Bases: APIView

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

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

Bases: RetrieveAPIView

API endpoint that shows details of an eighth signup.

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

alias of EighthSignupSerializer

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

Bases: CreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of EighthActivityDetailSerializer

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

Bases: ListCreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
list(request)[source]
permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of EighthToggleFavoriteSerializer

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

Bases: ListCreateAPIView

create(request, user_id=None)[source]
get_queryset()[source]
list(request)[source]
permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of EighthActivityListSerializer

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

Bases: ListCreateAPIView

create(request, user_id=None)[source]
is_valid_date(date_text)[source]
list(request, user_id=None)[source]
permission_classes = (<class 'intranet.apps.eighth.views.api.IsAuthenticatedOrClientCredentials'>,)
queryset
serializer_class

alias of EighthAddSignupSerializer

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

Bases: BasePermission

has_permission(request, view)[source]

intranet.apps.eighth.views.attendance module

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

Bases: 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

intranet.apps.eighth.views.signup.eighth_location(request)[source]

Module contents