Users

This package contains all views related to users

Region User Actions

This module contains view actions for region user objects.

integreat_cms.cms.views.users.region_user_actions.delete_region_user(request: HttpRequest, region_slug: str, user_id: int) HttpResponseRedirect[source]

This view deletes a region user

Parameters:
  • request (HttpRequest) – The current request

  • region_slug (str) – The slug of the current region

  • user_id (int) – The id of the user which should be deleted

Returns:

A redirection to region user list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.users.region_user_actions.resend_activation_link_region(request: HttpRequest, region_slug: str, user_id: int) HttpResponseRedirect[source]

Resends an activation link to a region user

Parameters:
  • request (HttpRequest) – The current request

  • region_slug (str) – The slug of the current region

  • user_id (int) – users id to send the activation link

Returns:

A redirection to region user list

Return type:

HttpResponseRedirect

Region User Form View

class integreat_cms.cms.views.users.region_user_form_view.RegionUserFormView(**kwargs)[source]

Bases: TemplateView

View for the user form of region users

extra_context = {'current_menu_item': 'region_user_form'}[source]

The context dict passed to the template (see ContextMixin)

get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Render UserForm for region users

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Submit UserForm and save User object for region users

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

template_name = 'users/region_user_form.html'[source]

The template to render (see TemplateResponseMixin)

Region User List View

class integreat_cms.cms.views.users.region_user_list_view.RegionUserListView(**kwargs)[source]

Bases: TemplateView

View for listing region users

extra_context = {'current_menu_item': 'region_users'}[source]

The context dict passed to the template (see ContextMixin)

get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Render region user list

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Apply the query and filter the rendered users

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

template_name = 'users/region_user_list.html'[source]

The template to render (see TemplateResponseMixin)

User Actions

This module contains view actions for user objects.

integreat_cms.cms.views.users.user_actions.delete_user(request: HttpRequest, user_id: int) HttpResponseRedirect[source]

This view deletes a user

Parameters:
  • request (HttpRequest) – The current request

  • user_id (int) – The id of the user which should be deleted

Returns:

A redirection to user list

Return type:

HttpResponseRedirect

integreat_cms.cms.views.users.user_actions.resend_activation_link(request: HttpRequest, user_id: int) HttpResponseRedirect[source]

Resends an activation link to an user

Parameters:
  • request (HttpRequest) – The current request

  • user_id (int) – users id to send the activation link

Returns:

A redirection to region user list

Return type:

HttpResponseRedirect

User Form View

class integreat_cms.cms.views.users.user_form_view.UserFormView(**kwargs)[source]

Bases: TemplateView

View for the user form and user form

extra_context = {'current_menu_item': 'user_form'}[source]

The context dict passed to the template (see ContextMixin)

get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Render UserForm

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Submit UserForm and save User

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

template_name = 'users/user_form.html'[source]

The template to render (see TemplateResponseMixin)

User List View

class integreat_cms.cms.views.users.user_list_view.UserListView(**kwargs)[source]

Bases: TemplateView

View for listing all users (admin users and region users)

extra_context = {'current_menu_item': 'users'}[source]

The context dict passed to the template (see ContextMixin)

get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse[source]

Render user list

Parameters:
  • request (HttpRequest) – The current request

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Returns:

The rendered template response

Return type:

HttpResponse

template_name = 'users/user_list.html'[source]

The template to render (see TemplateResponseMixin)