web.views.email_views package

web.views.email_views package containing views for the core.models.Email data.

class web.views.email_views.EmailArchiveIndexView(**kwargs)[source]

Bases: LoginRequiredMixin, EmailArchiveMixin, ArchiveIndexView

IndexView for the ArchiveViews for emails.

URL_NAME = 'email-archive-index'
template_name = 'web/email/archive/index.html'
context_object_name = 'object_list'
get_context_data(*args, **kwargs)[source]

Extended method to allow variable page sizes.

Return type:

dict[str, Any]

Returns:

The context with a page_size added to it.

Parameters:
class web.views.email_views.EmailConversationTableView(**kwargs)[source]

Bases: SingleTableMixin, EmailConversationView

View for tabling core.models.Email instances belonging to an emails conversation.

URL_NAME = 'email-conversation-table'
template_name = 'web/email/email_conversation_table.html'
table_class

alias of BaseEmailTable

get_paginate_by(table_data)[source]

Overridden to reconcile mixin and view.

Return type:

int

Parameters:

table_data (QuerySet)

class web.views.email_views.EmailConversationView(**kwargs)[source]

Bases: EmailFilterView, SingleObjectMixin

View for filtering listed core.models.Email instances belonging to an emails conversation.

URL_NAME = 'email-conversation'
template_name = 'web/email/email_conversation_filter_list.html'
get_queryset()[source]

Restricts the queryset to objects owned by the requesting user.

Return type:

QuerySet

get_context_data(**kwargs)[source]

Extended method to pass the query parameters to the context.

References

https://jeffpohlmeyer.com/django-filters-with-pagination

Return type:

dict[str, Any]

Returns:

The view’s context with added query parameters.

Parameters:

kwargs (Any)

class web.views.email_views.EmailDayArchiveView(**kwargs)[source]

Bases: LoginRequiredMixin, EmailArchiveMixin, DayArchiveView

DayArchiveView for emails.

URL_NAME = 'email-archive-day'
template_name = 'web/email/archive/day.html'
month_format = '%m'
class web.views.email_views.EmailDetailWithDeleteView(**kwargs)[source]

Bases: LoginRequiredMixin, DetailWithDeleteView, CustomActionMixin

View for a single core.models.Email instance.

URL_NAME = 'email-detail'
model

alias of Email

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:

QuerySet

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_reprocess(request)[source]

Handler function for the reprocess action.

Parameters:

request (HttpRequest) – The action request to handle.

Return type:

HttpResponse

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:

HttpResponse

Returns:

A template response with the updated view after the action.

class web.views.email_views.EmailFilterView(**kwargs)[source]

Bases: LoginRequiredMixin, FilterPageView

View for filtering listed core.models.Email instances.

URL_NAME = 'email-filter-list'
model

alias of Email

template_name = 'web/email/email_filter_list.html'
context_object_name = 'emails'
filterset_class

alias of EmailFilterSet

ordering = ['-is_favorite', '-datetime']
get_queryset()[source]

Restricts the queryset to objects owned by the requesting user.

Return type:

QuerySet

class web.views.email_views.EmailMonthArchiveView(**kwargs)[source]

Bases: LoginRequiredMixin, EmailArchiveMixin, MonthArchiveView

MonthArchiveView for emails.

URL_NAME = 'email-archive-month'
template_name = 'web/email/archive/month.html'
month_format = '%m'
class web.views.email_views.EmailTableView(**kwargs)[source]

Bases: SingleTableMixin, EmailFilterView

View for filtering a table of core.models.Email instances.

URL_NAME = 'email-table'
template_name = 'web/email/email_table.html'
table_class

alias of BaseEmailTable

get_paginate_by(table_data)[source]

Overridden to reconcile mixin and view.

Return type:

int

Parameters:

table_data (QuerySet)

class web.views.email_views.EmailWeekArchiveView(**kwargs)[source]

Bases: LoginRequiredMixin, EmailArchiveMixin, WeekArchiveView

WeekArchiveView for emails.

URL_NAME = 'email-archive-week'
template_name = 'web/email/archive/week.html'
week_format = '%V'
year_format = '%G'
class web.views.email_views.EmailYearArchiveView(**kwargs)[source]

Bases: LoginRequiredMixin, EmailArchiveMixin, YearArchiveView

YearArchiveView for emails.

URL_NAME = 'email-archive-year'
template_name = 'web/email/archive/year.html'

Subpackages

Submodules