AlekSIS
AlekSIS

Core views

class aleksis.core.views.AccountRegisterView(**kwargs)[source]

Custom view to register a user account.

Rewrites dispatch function from allauth to check if signup is open or if the user has a verified email address from an invitation; otherwise raises permission denied.

form_class

alias of aleksis.core.forms.AccountRegisterForm

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

class aleksis.core.views.AssignPermissionView(**kwargs)[source]

View for assigning a permission to users/groups for all/some objects.

form_class

alias of aleksis.core.forms.AssignPermissionForm

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

Return type

HttpResponse

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

Return type

Dict[str, Any]

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

Return type

Dict[str, Any]

class aleksis.core.views.CeleryProgressView(**kwargs)[source]

Wrap celery-progress view to check permissions before.

class aleksis.core.views.CreatePersonView(**kwargs)[source]
form_class

alias of aleksis.core.forms.PersonForm

model

alias of aleksis.core.models.Person

class aleksis.core.views.CustomAuthorizationView(**kwargs)[source]
get_context_data(**kwargs)[source]

Override context data to hide side menu.

handle_no_permission()[source]

Override handle_no_permission to provide OAuth2 information to login page.

class aleksis.core.views.CustomPasswordChangeView(*args, **kwargs)[source]

Custom password change view to allow to disable changing of password.

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

class aleksis.core.views.DashboardWidgetCreateView(**kwargs)[source]

Create view for dashboard widgets.

get(request, *args, **kwargs)[source]

Handle GET requests: instantiate a blank version of the form.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

Return type

dict[str, Any]

post(request, *args, **kwargs)[source]

Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.

class aleksis.core.views.DashboardWidgetDeleteView(**kwargs)[source]

Delete view for dashboard widgets.

model

alias of aleksis.core.models.DashboardWidget

class aleksis.core.views.DashboardWidgetEditView(**kwargs)[source]

Edit view for dashboard widgets.

get_form_class()[source]

Return the form class to use in this view.

Return type

Type[BaseModelForm]

model

alias of aleksis.core.models.DashboardWidget

class aleksis.core.views.DashboardWidgetListView(**kwargs)[source]

Table of all dashboard widgets.

get_context_data(**kwargs)[source]

Overridden version of .TemplateResponseMixin to inject the table into the template’s context.

Return type

dict[str, Any]

model

alias of aleksis.core.models.DashboardWidget

table_class

alias of aleksis.core.tables.DashboardWidgetTable

class aleksis.core.views.DataCheckView(**kwargs)[source]
get_context_data(**kwargs)[source]

Get the context for this view.

Return type

dict[str, Any]

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

Return type

QuerySet

model

alias of aleksis.core.models.DataCheckResult

class aleksis.core.views.EditDashboardView(**kwargs)[source]

View for editing dashboard widget order.

class aleksis.core.views.EditPersonView(*args, **kwargs)[source]
form_class

alias of aleksis.core.forms.PersonForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

model

alias of aleksis.core.models.Person

class aleksis.core.views.EnterInvitationCode(**kwargs)[source]

View to enter an invitation code.

form_class

alias of aleksis.core.forms.InvitationCodeForm

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

class aleksis.core.views.GenerateInvitationCode(**kwargs)[source]

View to generate an invitation code.

class aleksis.core.views.GroupGlobalPermissionDeleteView(**kwargs)[source]

Delete a global group permission.

model

alias of django.contrib.auth.models.Group_permissions

class aleksis.core.views.GroupGlobalPermissionsListBaseView(**kwargs)[source]

List all global group permissions.

filterset_class

alias of aleksis.core.filters.GroupGlobalPermissionFilter

table_class

alias of aleksis.core.tables.GroupGlobalPermissionTable

class aleksis.core.views.GroupObjectPermissionDeleteView(**kwargs)[source]

Delete a object group permission.

model

alias of guardian.models.models.GroupObjectPermission

class aleksis.core.views.GroupObjectPermissionsListBaseView(**kwargs)[source]

List all object group permissions.

filterset_class

alias of aleksis.core.filters.GroupObjectPermissionFilter

table_class

alias of aleksis.core.tables.GroupObjectPermissionTable

class aleksis.core.views.InvitePerson(**kwargs)[source]

View to invite a person to register an account.

get_context_data(**kwargs)[source]

Overridden version of .TemplateResponseMixin to inject the table into the template’s context.

model

alias of aleksis.core.models.PersonInvitation

table_class

alias of aleksis.core.tables.InvitationsTable

class aleksis.core.views.InvitePersonByID(**kwargs)[source]

Custom view to invite person by their ID.

class aleksis.core.views.LoginView(**kwargs)[source]

Custom login view covering e-mail verification if mandatory.

Overrides view from allauth to check if email verification from django-invitations is mandatory. If it i, checks if the user has a verified email address, if not, it re-sends verification.

done(form_list, **kwargs)[source]

Login the user and redirect to the desired page.

get_context_data(form, **kwargs)[source]

Override context data to hide side menu and include OAuth2 application if given.

class aleksis.core.views.ManifestView(**kwargs)[source]

Build manifest.json for PWA.

class aleksis.core.views.NotificationsListView(**kwargs)[source]
get_context_data(**kwargs)[source]

Get the context for this view.

Return type

dict[str, Any]

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

Return type

QuerySet

class aleksis.core.views.OAuth2DeleteView(**kwargs)[source]

View used to delete an application.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

class aleksis.core.views.OAuth2DetailView(**kwargs)[source]

Detail view for an application instance.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

class aleksis.core.views.OAuth2EditView(**kwargs)[source]

View used to edit an application.

form_class

alias of aleksis.core.forms.OAuthApplicationForm

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

class aleksis.core.views.OAuth2ListView(**kwargs)[source]

List view for all the applications.

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

class aleksis.core.views.OAuth2RegisterView(**kwargs)[source]

View used to register an application.

form_class

alias of aleksis.core.forms.OAuthApplicationForm

class aleksis.core.views.OfflineView(**kwargs)[source]

Show an error page if there is no internet connection.

class aleksis.core.views.PermissionSearchView(**kwargs)[source]

Wrapper to apply permission to haystack’s search view.

get_context_data(*, object_list=None, **kwargs)[source]

Get the context for this view.

class aleksis.core.views.PermissionsListBaseView(**kwargs)[source]

Base view for list of all permissions.

get_context_data(**kwargs)[source]

Overridden version of .TemplateResponseMixin to inject the table into the template’s context.

class aleksis.core.views.RedirectToPDFFile(**kwargs)[source]

Redirect to a generated PDF file.

model

alias of aleksis.core.models.PDFFile

class aleksis.core.views.RenderPDFView(**kwargs)[source]

View to render a PDF file from a template.

Makes use of render_pdf.

class aleksis.core.views.RunDataChecks(**kwargs)[source]
class aleksis.core.views.SchoolTermCreateView(**kwargs)[source]

Create view for school terms.

form_class

alias of aleksis.core.forms.SchoolTermForm

model

alias of aleksis.core.models.SchoolTerm

class aleksis.core.views.SchoolTermEditView(**kwargs)[source]

Edit view for school terms.

form_class

alias of aleksis.core.forms.SchoolTermForm

model

alias of aleksis.core.models.SchoolTerm

class aleksis.core.views.SchoolTermListView(**kwargs)[source]

Table of all school terms.

model

alias of aleksis.core.models.SchoolTerm

table_class

alias of aleksis.core.tables.SchoolTermTable

class aleksis.core.views.SelectPermissionForAssignView(**kwargs)[source]

View for selecting a permission to assign.

form_class

alias of aleksis.core.forms.SelectPermissionForm

form_invalid(form)[source]

If the form is invalid, render the invalid form.

Return type

HttpResponse

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

Return type

HttpResponse

class aleksis.core.views.ServiceWorkerView(**kwargs)[source]

Render serviceworker.js under root URL.

This can’t be done by static files, because the PWA has a scope and only accepts service worker files from the root URL.

class aleksis.core.views.SocialAccountDeleteView(**kwargs)[source]

Custom view to delete django-allauth social account.

delete(request, *args, **kwargs)[source]

Call the delete() method on the fetched object and then redirect to the success URL.

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

class aleksis.core.views.SolveDataCheckView(*args, **kwargs)[source]
class aleksis.core.views.SystemStatus(**kwargs)[source]

View giving information about the system status.

class aleksis.core.views.TestPDFGenerationView(**kwargs)[source]
class aleksis.core.views.UserGlobalPermissionDeleteView(**kwargs)[source]

Delete a global user permission.

model

alias of django.contrib.auth.models.User_user_permissions

class aleksis.core.views.UserGlobalPermissionsListBaseView(**kwargs)[source]

List all global user permissions.

filterset_class

alias of aleksis.core.filters.UserGlobalPermissionFilter

table_class

alias of aleksis.core.tables.UserGlobalPermissionTable

class aleksis.core.views.UserObjectPermissionDeleteView(**kwargs)[source]

Delete a object user permission.

model

alias of guardian.models.models.UserObjectPermission

class aleksis.core.views.UserObjectPermissionsListBaseView(**kwargs)[source]

List all object user permissions.

filterset_class

alias of aleksis.core.filters.UserObjectPermissionFilter

table_class

alias of aleksis.core.tables.UserObjectPermissionTable

aleksis.core.views.about(request)[source]

About page listing all apps.

Return type

HttpResponse

aleksis.core.views.additional_fields(request)[source]

List view for listing all additional fields.

Return type

HttpResponse

aleksis.core.views.announcement_form(request, id_=None)[source]

View to create or edit an announcement.

Return type

HttpResponse

aleksis.core.views.announcements(request)[source]

List view of announcements.

Return type

HttpResponse

aleksis.core.views.data_management(request)[source]

View with special menu for data management.

Return type

HttpResponse

aleksis.core.views.delete_additional_field(request, id_)[source]

View to delete an additional field.

Return type

HttpResponse

aleksis.core.views.delete_announcement(request, id_)[source]

View to delete an announcement.

Return type

HttpResponse

aleksis.core.views.delete_group(request, id_)[source]

View to delete an group.

Return type

HttpResponse

aleksis.core.views.delete_group_type(request, id_)[source]

View to delete an group_type.

Return type

HttpResponse

aleksis.core.views.delete_person(request, id_)[source]

View to delete an person.

Return type

HttpResponse

aleksis.core.views.edit_additional_field(request, id_=None)[source]

View to edit or create a additional_field.

Return type

HttpResponse

aleksis.core.views.edit_group(request, id_=None)[source]

View to edit or create a group.

Return type

HttpResponse

aleksis.core.views.edit_group_type(request, id_=None)[source]

View to edit or create a group_type.

Return type

HttpResponse

aleksis.core.views.group(request, id_)[source]

Detail view for one group.

Return type

HttpResponse

aleksis.core.views.group_types(request)[source]

List view for listing all group types.

Return type

HttpResponse

aleksis.core.views.groups(request)[source]

List view for listing all groups.

Return type

HttpResponse

aleksis.core.views.groups_child_groups(request)[source]

View for batch-processing assignment from child groups to groups.

Return type

HttpResponse

aleksis.core.views.index(request)[source]

View for dashboard.

Return type

HttpResponse

aleksis.core.views.notification_mark_read(request, id_)[source]

Mark a notification read.

Return type

HttpResponse

aleksis.core.views.person(request, id_=None)[source]

Detail view for one person; defaulting to logged-in person.

Return type

HttpResponse

aleksis.core.views.persons(request)[source]

List view listing all persons.

Return type

HttpResponse

aleksis.core.views.preferences(request, registry_name='person', pk=None, section=None)[source]

View for changing preferences.

Return type

HttpResponse

aleksis.core.views.searchbar_snippets(request)[source]

View to return HTML snippet with searchbar autocompletion results.

Return type

HttpResponse

aleksis.core.views.server_error(request, template_name='500.html')[source]

Ensure the request is passed to the error page.

Return type

HttpResponseServerError