web.views.account_views.AccountDetailWithDeleteView module

Module with the web.views.AccountDetailWithDeleteView view.

class web.views.account_views.AccountDetailWithDeleteView.AccountDetailWithDeleteView(**kwargs)[source]

Bases: LoginRequiredMixin, DetailWithDeleteView, CustomActionMixin, TestActionMixin

View for a single core.models.Account instance.

URL_NAME = 'account-detail'
model

alias of Account

template_name = 'web/account/account_detail.html'
success_url = '/accounts/'
get_queryset()[source]

Restricts the queryset to objects owned by the requesting user.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Extended to add the accounts latest emails to the context.

Return type:

dict[str, Any]

Parameters:

kwargs (Any)

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

Creates response to a post request.

If no action matches the existing handlers, responds with Http204. Should be executed last in a custom view post method.

Parameters:
Return type:

HttpResponse

Returns:

The handlers response to the request. If no matching handler is found Http204.

Raises:

ImproperlyConfigured – If the called handler method does not return a django.http.HttpResponse.>

handle_update_mailboxes(request)[source]

Handler function for the update-mailboxes action.

Parameters:

request (HttpRequest) – The action request to handle.

Return type:

HttpResponse

Returns:

A template response with the updated view after the action.

handle_add_daemons(request)[source]

Handler function for the add-daemons action.

Parameters:

request (HttpRequest) – The action request to handle.

Return type:

HttpResponse

Returns:

A template response with the updated view after the action.