nlpmed_portal.users.views module

class nlpmed_portal.users.views.UserUpdateView[source]

Bases: LoginRequiredMixin, SuccessMessageMixin, UpdateView

model

alias of User

form_class

alias of UserUpdateForm

success_message = 'Information successfully updated'
template_name = 'users/user_update_form.html'
get_success_url()[source]

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

Return type:

str

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.

Parameters:

queryset (QuerySet | None)

Return type:

User

dispatch(request, *args, **kwargs)[source]
class nlpmed_portal.users.views.UserChangePwdView[source]

Bases: LoginRequiredMixin, SuccessMessageMixin, PasswordChangeView

template_name = 'users/user_changepwd_form.html'
get_success_url()[source]

We’re in a mixin, so we cannot rely on the fact that our super() has a get_success_url. Also, we want to check for – in this order: 1) The ?next=/foo 2) The get_succes_url() if available. 3) The .success_url if available. 4) A fallback default success URL: get_default_success_url().

Return type:

str

dispatch(request, *args, **kwargs)[source]
class nlpmed_portal.users.views.UserRedirectView[source]

Bases: LoginRequiredMixin, RedirectView

permanent = False
get_redirect_url()[source]

Return the URL redirect to. Keyword arguments from the URL pattern match generating the redirect request are provided as kwargs to this method.

Return type:

str

class nlpmed_portal.users.views.ListUserSessionsView[source]

Bases: FormView

template_name = 'users/usersession_list.html'
form_class

alias of ManageUserSessionsForm

success_url = '/sessions/'
get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

form_valid(form)[source]

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

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