cri_frontend.views module

class cri_frontend.views.CRIGroupView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.DetailView

dispatch(*args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

is_user_allowed()[source]
model

alias of cri_models.models.crigroup.CRIGroup

template_name = 'cri_frontend/crigroup_detail.html'
class cri_frontend.views.CRIUserChangePasswordView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.contrib.auth.views.PasswordChangeView, django.views.generic.detail.SingleObjectMixin

dispatch(request, *args, **kwargs)[source]
form_valid(form)[source]

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

get_form_class()[source]

Return the form class to use.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

is_user_allowed()[source]
model

alias of cri_models.models.criuser.CRIUser

slug_field = 'username'
slug_url_kwarg = 'username'
template_name = 'cri_frontend/criuser_password.html'
class cri_frontend.views.CRIUserConnectionLogView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.list.ListView

context_object_name = 'logs'
dispatch(request, *args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Get the context for this view.

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.

is_user_allowed()[source]
model

alias of cri_auth.models.ConnectionLogEntry

paginate_by = 20
template_name = 'cri_frontend/criuser_connection_log.html'
class cri_frontend.views.CRIUserEditView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)[source]
form_class

alias of cri_frontend.forms.CRIUserForm

form_valid(form)[source]

If the form is valid, save the associated model.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

is_user_allowed()[source]
model

alias of cri_models.models.criuser.CRIUser

slug_field = 'username'
slug_url_kwarg = 'username'
template_name = 'cri_frontend/criuser_editprofile.html'
class cri_frontend.views.CRIUserNoteCreateView(**kwargs)[source]

Bases: cri_frontend.views.CRIUserNoteFormMixin, django.views.generic.edit.CreateView

class cri_frontend.views.CRIUserNoteDeleteView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

dispatch(*args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

get_success_url()[source]
is_user_allowed()[source]
model

alias of cri_models.models.criusernote.CRIUserNote

template_name = 'cri_frontend/criusernote_confirm_delete.html'
class cri_frontend.views.CRIUserNoteFormMixin[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.SingleObjectMixin

dispatch(request, *args, **kwargs)[source]
form_class

alias of cri_frontend.forms.CRIUserNoteForm

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

Insert the single object into the context dict.

get_form_kwargs()[source]
get_success_url()[source]
is_user_allowed()[source]
model

alias of cri_models.models.criusernote.CRIUserNote

template_name = 'cri_frontend/criusernote_form.html'
class cri_frontend.views.CRIUserNoteUpdateView(**kwargs)[source]

Bases: cri_frontend.views.CRIUserNoteFormMixin, django.views.generic.edit.UpdateView

class cri_frontend.views.CRIUserNotesView(**kwargs)[source]

Bases: cri_frontend.views.CRIUserView

dispatch(request, *args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

is_user_allowed()[source]
template_name = 'cri_frontend/criusernote_list.html'
class cri_frontend.views.CRIUserOIDCView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.detail.DetailView

dispatch(request, *args, **kwargs)[source]
get_clients()[source]
get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

is_user_allowed()[source]
model

alias of cri_models.models.criuser.CRIUser

slug_field = 'username'
slug_url_kwarg = 'username'
template_name = 'cri_frontend/criuser_oidc.html'
class cri_frontend.views.CRIUserPhoto(**kwargs)[source]

Bases: django.views.generic.base.View

get(*args, **kwargs)[source]
class cri_frontend.views.CRIUserPhotoSquare(**kwargs)[source]

Bases: django.views.generic.base.View

get(*args, **kwargs)[source]
class cri_frontend.views.CRIUserPhotoThumb(**kwargs)[source]

Bases: django.views.generic.base.View

get(*args, **kwargs)[source]
class cri_frontend.views.CRIUserPreferencesView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)[source]
form_class

alias of cri_frontend.forms.CRIUserPreferenceForm

form_valid(form)[source]

If the form is valid, save the associated model.

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

Insert the form into the context dict.

get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

is_user_allowed()[source]
model

alias of cri_models.models.criuser.CRIUserPreference

template_name = 'cri_frontend/criuser_preferences.html'
class cri_frontend.views.CRIUserProfileMixin[source]

Bases: object

A mixin to use for all user profile views

Implementing class MUST have the criuser attribute set to the displayed CRIUser.

dispatch(*args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]
get_notes()[source]
class cri_frontend.views.CRIUserSSHKeysShortcutView(**kwargs)[source]

Bases: django.views.generic.base.View

get(*args, **kwargs)[source]
class cri_frontend.views.CRIUserSSHKeysView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.edit.CreateView

dispatch(*args, **kwargs)[source]
form_class

alias of cri_frontend.forms.SSHPublicKeyForm

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

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

is_user_allowed()[source]
model

alias of cri_models.models.criuser.SSHPublicKey

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

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

template_name = 'cri_frontend/criuser_ssh_keys.html'
class cri_frontend.views.CRIUserSelfView(**kwargs)[source]

Bases: cri_frontend.views.CRIUserView

get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

class cri_frontend.views.CRIUserTasksView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.list.ListView

dispatch(request, *args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Get the context for this view.

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.

is_user_allowed()[source]
paginate_by = 100
template_name = 'cri_frontend/criuser_tasks.html'
class cri_frontend.views.CRIUserView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, cri_frontend.views.CRIUserProfileMixin, django.views.generic.detail.DetailView

dispatch(*args, **kwargs)[source]
get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

model

alias of cri_models.models.criuser.CRIUser

slug_field = 'username'
slug_url_kwarg = 'username'
template_name = 'cri_frontend/criuser_detail.html'
class cri_frontend.views.ExportView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.FormView

EXPORT_FORMAT_MAP = {'csv': <import_export.formats.base_formats.CSV object>, 'html': <import_export.formats.base_formats.HTML object>, 'json': <import_export.formats.base_formats.JSON object>, 'ods': <import_export.formats.base_formats.ODS object>, 'tsv': <import_export.formats.base_formats.TSV object>, 'xls': <import_export.formats.base_formats.XLS object>, 'xlsx': <import_export.formats.base_formats.XLSX object>, 'yaml': <import_export.formats.base_formats.YAML object>}
EXPORT_TYPE_MAP = {'moodle': <class 'cri_models.import_export.CRIUserMoodleResource'>, 'regular': <class 'cri_models.import_export.CRIUserResource'>}
dispatch(*args, **kwargs)[source]
form_class

alias of cri_frontend.forms.ExportForm

form_valid(form)[source]

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

is_user_allowed()[source]
class cri_frontend.views.IndexView(**kwargs)[source]

Bases: django.views.generic.list.ListView

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.

model

alias of cri_frontend.models.Shortcut

template_name = 'cri_frontend/index.html'
class cri_frontend.views.MappingFromAttr(obj)[source]

Bases: object

class cri_frontend.views.NotAvailableView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

template_name = 'cri_frontend/not_available.html'
class cri_frontend.views.OIDCConsentDeleteView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

dispatch(*args, **kwargs)[source]
get_success_url()[source]
http_method_names = ('post', 'put', 'patch', 'delete', 'head', 'options', 'trace')
is_user_allowed()[source]
model

alias of oidc_provider.models.UserConsent

class cri_frontend.views.SSHKeyDeleteView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.DeleteView

dispatch(*args, **kwargs)[source]
get_success_url()[source]
http_method_names = ('post', 'put', 'patch', 'delete', 'head', 'options', 'trace')
is_user_allowed()[source]
model

alias of cri_models.models.criuser.SSHPublicKey

class cri_frontend.views.SearchFormView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.edit.FormView

form_class

alias of cri_frontend.forms.SearchForm

form_valid(form)[source]

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

get_context_data(*args, form=None, **kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

template_name = 'cri_frontend/search.html'
class cri_frontend.views.UserlistAction(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.View

dispatch_map = {'cards_issue': <class 'cri_cards.views.CardIssueFormView'>, 'export': <class 'cri_frontend.views.ExportView'>, 'keep-selected': <class 'cri_frontend.views.SearchFormView'>, 'search': <class 'cri_frontend.views.SearchFormView'>}
get(*args, **kwargs)[source]
get_dispatch_map()[source]
get_view()[source]
post(*args, **kwargs)[source]
cri_frontend.views.get_blank_criphoto()[source]
cri_frontend.views.get_criphoto(request_user, username, photo_type)[source]