web.views package¶
web.views package containing all views for the Eonvelope webapp.
- class web.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.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.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.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.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.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.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)
- class web.views.AttachmentDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixinView for a single
core.models.Attachmentinstance.- URL_NAME = 'attachment-detail'¶
- model¶
alias of
Attachment
- template_name = 'web/attachment/attachment_detail.html'¶
- success_url = '/attachments/'¶
- 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.>
Handler function for the share 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.AttachmentFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Attachmentinstances.- URL_NAME = 'attachment-filter-list'¶
- model¶
alias of
Attachment
- template_name = 'web/attachment/attachment_filter_list.html'¶
- context_object_name = 'attachments'¶
- filterset_class¶
alias of
AttachmentFilterSet
- ordering = ['-is_favorite', 'file_name']¶
- class web.views.AttachmentTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,AttachmentFilterViewView for filtering a table of
core.models.Attachmentinstances.- URL_NAME = 'attachment-table'¶
- template_name = 'web/attachment/attachment_table.html'¶
- table_class¶
alias of
BaseAttachmentTable
- class web.views.CorrespondentDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixinView for a single
core.models.Correspondentinstance.- URL_NAME = 'correspondent-detail'¶
- model¶
alias of
Correspondent
- template_name = 'web/correspondent/correspondent_detail.html'¶
- success_url = '/correspondents/'¶
- 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.>
Handler function for the share 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.CorrespondentEmailsFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageView,SingleObjectMixinView for filtering listed
core.models.EmailCorrespondentinstances with a certain correspondent.- URL_NAME = 'correspondent-emails'¶
- model¶
alias of
EmailCorrespondent
- template_name = 'web/correspondent/correspondent_email_filter_list.html'¶
- context_object_name = 'correspondent_emails'¶
- filterset_class¶
alias of
CorrespondentEmailFilterSet
- ordering = ['-created']¶
- class web.views.CorrespondentEmailsTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,CorrespondentEmailsFilterViewView for tabling
core.models.Emailinstances belonging to a certain correspondent.- URL_NAME = 'correspondent-emails-table'¶
- template_name = 'web/correspondent/correspondent_email_table.html'¶
- table_class¶
alias of
BaseCorrespondentEmailTable
- class web.views.CorrespondentFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Correspondentinstances.- URL_NAME = 'correspondent-filter-list'¶
- model¶
alias of
Correspondent
- template_name = 'web/correspondent/correspondent_filter_list.html'¶
- context_object_name = 'correspondents'¶
- filterset_class¶
alias of
CorrespondentFilterSet
- ordering = ['-is_favorite', 'email_address']¶
- class web.views.CorrespondentTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,CorrespondentFilterViewView for filtering a table of
core.models.Correspondentinstances.- URL_NAME = 'correspondent-table'¶
- template_name = 'web/correspondent/correspondent_table.html'¶
- table_class¶
alias of
BaseCorrespondentTable
- class web.views.CorrespondentUpdateOrDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,UpdateOrDeleteViewView for updating or deleting a single
core.models.Correspondentinstance.- URL_NAME = 'correspondent-edit'¶
- model¶
alias of
Correspondent
- form_class¶
alias of
BaseCorrespondentForm
- template_name = 'web/correspondent/correspondent_edit.html'¶
- delete_success_url = '/correspondents/'¶
The URL to redirect to after deletion. Must be set.
- class web.views.DaemonCreateView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,CreateViewView for creating a single
core.models.Daemoninstance.- URL_NAME = 'daemon-create'¶
- form_class¶
alias of
CreateDaemonForm
- template_name = 'web/daemon/daemon_create.html'¶
- class web.views.DaemonDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixin,TestActionMixinView for a single
core.models.Daemoninstance.- URL_NAME = 'daemon-detail'¶
- template_name = 'web/daemon/daemon_detail.html'¶
- success_url = '/routines/'¶
- 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_start_daemon(request)[source]¶
Handler function for the start-daemon action.
- Parameters:
request (
HttpRequest) – The action request to handle.- Return type:
- Returns:
A template response with the updated view after the action.
- handle_stop_daemon(request)[source]¶
Handler function for the stop-daemon 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.DaemonFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Daemoninstances.- URL_NAME = 'daemon-filter-list'¶
- template_name = 'web/daemon/daemon_filter_list.html'¶
- context_object_name = 'daemons'¶
- filterset_class¶
alias of
DaemonFilterSet
- ordering = ['mailbox__name']¶
- class web.views.DaemonTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,DaemonFilterViewView for filtering a table of
core.models.Daemoninstances.- URL_NAME = 'daemon-table'¶
- template_name = 'web/daemon/daemon_table.html'¶
- table_class¶
alias of
BaseDaemonTable
- class web.views.DaemonUpdateOrDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,UpdateOrDeleteViewView for updating or deleting a single
core.models.Daemoninstance.- URL_NAME = 'daemon-edit'¶
- form_class¶
alias of
BaseDaemonForm
- template_name = 'web/daemon/daemon_edit.html'¶
- delete_success_url = '/routines/'¶
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[BaseDaemonForm] | None)
- class web.views.DashboardView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,TemplateViewView function for the web dashboard.
- URL_NAME = 'dashboard'¶
- template_name = 'web/dashboard.html'¶
- class web.views.EmailArchiveIndexView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,EmailArchiveMixin,ArchiveIndexViewIndexView for the ArchiveViews for emails.
- URL_NAME = 'email-archive-index'¶
- template_name = 'web/email/archive/index.html'¶
- context_object_name = 'object_list'¶
- class web.views.EmailConversationTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,EmailConversationViewView for tabling
core.models.Emailinstances belonging to an emails conversation.- URL_NAME = 'email-conversation-table'¶
- template_name = 'web/email/email_conversation_table.html'¶
- table_class¶
alias of
BaseEmailTable
- class web.views.EmailConversationView(**kwargs)[source]¶
Bases:
EmailFilterView,SingleObjectMixinView for filtering listed
core.models.Emailinstances belonging to an emails conversation.- URL_NAME = 'email-conversation'¶
- template_name = 'web/email/email_conversation_filter_list.html'¶
- class web.views.EmailDayArchiveView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,EmailArchiveMixin,DayArchiveViewDayArchiveView for emails.
- URL_NAME = 'email-archive-day'¶
- template_name = 'web/email/archive/day.html'¶
- month_format = '%m'¶
- class web.views.EmailDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixinView for a single
core.models.Emailinstance.- URL_NAME = 'email-detail'¶
- template_name = 'web/email/email_detail.html'¶
- success_url = '/emails/'¶
- 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_reprocess(request)[source]¶
Handler function for the reprocess action.
- Parameters:
request (
HttpRequest) – The action request to handle.- Return type:
- Returns:
A template response with the updated view after the action.
- handle_restore(request)[source]¶
Handler function for the restore 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.EmailFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Emailinstances.- URL_NAME = 'email-filter-list'¶
- template_name = 'web/email/email_filter_list.html'¶
- context_object_name = 'emails'¶
- filterset_class¶
alias of
EmailFilterSet
- ordering = ['-is_favorite', '-datetime']¶
- class web.views.EmailMonthArchiveView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,EmailArchiveMixin,MonthArchiveViewMonthArchiveView for emails.
- URL_NAME = 'email-archive-month'¶
- template_name = 'web/email/archive/month.html'¶
- month_format = '%m'¶
- class web.views.EmailTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,EmailFilterViewView for filtering a table of
core.models.Emailinstances.- URL_NAME = 'email-table'¶
- template_name = 'web/email/email_table.html'¶
- table_class¶
alias of
BaseEmailTable
- class web.views.EmailWeekArchiveView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,EmailArchiveMixin,WeekArchiveViewWeekArchiveView for emails.
- URL_NAME = 'email-archive-week'¶
- template_name = 'web/email/archive/week.html'¶
- week_format = '%V'¶
- year_format = '%G'¶
- class web.views.EmailYearArchiveView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,EmailArchiveMixin,YearArchiveViewYearArchiveView for emails.
- URL_NAME = 'email-archive-year'¶
- template_name = 'web/email/archive/year.html'¶
- class web.views.MailboxCreateDaemonView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailView,BaseFormViewView for creating a single
core.models.Daemoninstance.- URL_NAME = 'mailbox-create-daemon'¶
- form_class¶
alias of
CreateMailboxDaemonForm
- template_name = 'web/mailbox/mailbox_daemon_create.html'¶
- 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[CreateMailboxDaemonForm] | None)
- get_success_url()[source]¶
Return the URL to redirect to after processing a valid form.
- Return type:
- form_valid(form)[source]¶
If the form is valid, save the associated model.
- Return type:
- Parameters:
form (CreateMailboxDaemonForm)
- get(request, *args, **kwargs)[source]¶
Handle GET requests: instantiate a blank version of the form.
- Return type:
- Parameters:
- class web.views.MailboxDetailWithDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailWithDeleteView,CustomActionMixin,TestActionMixinView for a single
core.models.Mailboxinstance.- URL_NAME = 'mailbox-detail'¶
- template_name = 'web/mailbox/mailbox_detail.html'¶
- success_url = '/mailboxes/'¶
- 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_fetch(request)[source]¶
Handler function for the fetch 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.MailboxEmailsFilterView(**kwargs)[source]¶
Bases:
EmailFilterView,SingleObjectMixinView for filtering listed
core.models.Emailinstances belonging to a certain mailbox.- URL_NAME = 'mailbox-emails'¶
- template_name = 'web/mailbox/mailbox_email_filter_list.html'¶
- class web.views.MailboxEmailsTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,MailboxEmailsFilterViewView for tabling
core.models.Emailinstances belonging to a certain mailbox.- URL_NAME = 'mailbox-emails-table'¶
- template_name = 'web/mailbox/mailbox_email_table.html'¶
- table_class¶
alias of
BaseEmailTable
- class web.views.MailboxFilterView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,FilterPageViewView for filtering listed
core.models.Mailboxinstances.- URL_NAME = 'mailbox-filter-list'¶
- template_name = 'web/mailbox/mailbox_filter_list.html'¶
- context_object_name = 'mailboxes'¶
- filterset_class¶
alias of
MailboxFilterSet
- ordering = ['-is_favorite', 'account__mail_address', 'name']¶
- class web.views.MailboxTableView(**kwargs)[source]¶
Bases:
SingleTableMixin,MailboxFilterViewView for filtering a table of
core.models.Mailboxinstances.- URL_NAME = 'mailbox-table'¶
- template_name = 'web/mailbox/mailbox_table.html'¶
- table_class¶
alias of
BaseMailboxTable
- class web.views.MailboxUpdateOrDeleteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,UpdateOrDeleteViewView for updating or deleting a single
core.models.Mailboxinstance.- URL_NAME = 'mailbox-edit'¶
- form_class¶
alias of
BaseMailboxForm
- template_name = 'web/mailbox/mailbox_edit.html'¶
- delete_success_url = '/mailboxes/'¶
The URL to redirect to after deletion. Must be set.
- class web.views.UploadEmailView(**kwargs)[source]¶
Bases:
LoginRequiredMixin,DetailView,FormViewView for uploading email and mailbox files to a mailbox.
- URL_NAME = 'mailbox-upload'¶
- context_object_name = 'mailbox'¶
- form_class¶
alias of
UploadEmailForm
- template_name = 'web/mailbox/upload_email.html'¶
- get_success_url()[source]¶
Gets the success_url of the upload.
- Return type:
- Returns:
The detail url of the mailbox.
- get_queryset()[source]¶
Restricts the queryset to objects owned by the requesting user.
- Return type:
- form_valid(form)[source]¶
Runs when the request form data is valid.
- Parameters:
form (
UploadEmailForm) – The form of the request data.- Return type:
- Returns:
A
django.http.HttpResponseredirecting tosuccess_url.
- form_invalid(form)[source]¶
Runs when the request form data is invalid.
Note
This override is required to reconcile
FormViewandDetailView.- Parameters:
form (
UploadEmailForm) – The form of the request data.- Return type:
- Returns:
A
django.http.HttpResponseredirecting tosuccess_url.
Subpackages¶
- web.views.account_views package
- 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
- Submodules
- web.views.attachment_views package
- web.views.correspondent_views package
- Submodules
- web.views.correspondent_views.CorrespondentDetailWithDeleteView module
- web.views.correspondent_views.CorrespondentEmailsFilterView module
- web.views.correspondent_views.CorrespondentEmailsTableView module
- web.views.correspondent_views.CorrespondentFilterView module
- web.views.correspondent_views.CorrespondentTableView module
- web.views.correspondent_views.CorrespondentUpdateOrDeleteView module
- Submodules
- web.views.daemon_views package
- web.views.email_views package
- web.views.mailbox_views package
- Submodules
- web.views.mailbox_views.MailboxCreateDaemonView module
- web.views.mailbox_views.MailboxDetailWithDeleteView module
- web.views.mailbox_views.MailboxEmailsFilterView module
- web.views.mailbox_views.MailboxEmailsTableView module
- web.views.mailbox_views.MailboxFilterView module
- web.views.mailbox_views.MailboxTableView module
- web.views.mailbox_views.MailboxUpdateOrDeleteView module
- web.views.mailbox_views.UploadEmailView module
- Submodules