web.views.account_views package¶
web.views.account_views package containing views for the core.models.Account data.
- class web.views.account_views.AccountCreateView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,CreateViewView for creating a single
core.models.Accountinstance.- URL_NAME = 'account-create'¶
- form_class¶
alias of
BaseAccountForm
- template_name = 'web/account/account_create.html'¶
- get_form(form_class=None)[source]¶
Return an instance of the form to be used in this view.
- Return type:
- Parameters:
form_class (type[BaseAccountForm] | None)
- class web.views.account_views.AccountDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixin,TestActionMixinView for a single
core.models.Accountinstance.- URL_NAME = 'account-detail'¶
- 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:
- 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:
request (
HttpRequest) – The post request to handle.args (Any)
kwargs (Any)
- Return type:
- 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:
- 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:
- Returns:
A template response with the updated view after the action.
- class web.views.account_views.AccountEmailsFilterView(**kwargs)[source]¶
Bases:
EmailFilterView,SingleObjectMixinView for filtering listed
core.models.Emailinstances belonging to a certain account.- URL_NAME = 'account-emails'¶
- template_name = 'web/account/account_email_filter_list.html'¶
- class web.views.account_views.AccountEmailsTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,AccountEmailsFilterViewView for tabling
core.models.Emailinstances belonging to a certain account.- URL_NAME = 'account-emails-table'¶
- template_name = 'web/account/account_email_table.html'¶
- table_class¶
alias of
BaseEmailTable
- class web.views.account_views.AccountFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Accountinstances.- URL_NAME = 'account-filter-list'¶
- template_name = 'web/account/account_filter_list.html'¶
- filterset_class¶
alias of
AccountFilterSet
- ordering = ['-is_favorite', 'mail_address']¶
- class web.views.account_views.AccountTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,AccountFilterViewView for filtering a table of
core.models.Accountinstances.- URL_NAME = 'account-table'¶
- template_name = 'web/account/account_table.html'¶
- table_class¶
alias of
BaseAccountTable
- class web.views.account_views.AccountUpdateOrDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,UpdateOrDeleteViewView for updating or deleting a single
core.models.Accountinstance.- URL_NAME = 'account-edit'¶
- form_class¶
alias of
BaseAccountForm
- template_name = 'web/account/account_edit.html'¶
- delete_success_url = '/accounts/'¶
The URL to redirect to after deletion. Must be set.
- get_queryset()[source]¶
Restricts the queryset to objects owned by the requesting user.
- Return type:
- get_form(form_class=None)[source]¶
Return an instance of the form to be used in this view.
- Return type:
- Parameters:
form_class (type[BaseAccountForm] | None)
Submodules¶
- web.views.account_views.AccountCreateView module
- web.views.account_views.AccountDetailWithDeleteView module
- web.views.account_views.AccountEmailsFilterView module
- web.views.account_views.AccountEmailsTableView module
- web.views.account_views.AccountFilterView module
- web.views.account_views.AccountTableView module
- web.views.account_views.AccountUpdateOrDeleteView module