web.views.mailbox_views.UploadEmailView module¶
Module with the web.views.UploadEmailView view class.
- class web.views.mailbox_views.UploadEmailView.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.