web.views.correspondent_views package¶
web.views.correspondent_views package containing views for the core.models.Correspondent data.
- class web.views.correspondent_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.correspondent_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.correspondent_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.correspondent_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.correspondent_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.correspondent_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.
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