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
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
- __init__(**kwargs)[source]
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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
- get_template_names()[source]
Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse [source]
Submit
UserForm
and saveUser
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
- render_to_response(context, **response_kwargs)[source]
Return a response, using the response_class for this view, with a template rendered with the given context.
Pass response_kwargs to the constructor of the response class.
- response_class[source]
alias of
TemplateResponse
- 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
- __init__(**kwargs)[source]
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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
- get_template_names()[source]
Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.
- 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
- render_to_response(context, **response_kwargs)[source]
Return a response, using the response_class for this view, with a template rendered with the given context.
Pass response_kwargs to the constructor of the response class.
- response_class[source]
alias of
TemplateResponse
- 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
- __init__(**kwargs)[source]
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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
- get_template_names()[source]
Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.
- post(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponse [source]
-
- 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
- render_to_response(context, **response_kwargs)[source]
Return a response, using the response_class for this view, with a template rendered with the given context.
Pass response_kwargs to the constructor of the response class.
- response_class[source]
alias of
TemplateResponse
- 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)
- __init__(**kwargs)[source]
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- 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
- get_template_names()[source]
Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.
- render_to_response(context, **response_kwargs)[source]
Return a response, using the response_class for this view, with a template rendered with the given context.
Pass response_kwargs to the constructor of the response class.
- response_class[source]
alias of
TemplateResponse
- template_name = 'users/user_list.html'[source]
The template to render (see
TemplateResponseMixin
)