Dashboard

This package contains all dashboard views

Admin Dashboard View

class integreat_cms.cms.views.dashboard.admin_dashboard_view.AdminDashboardView[source]

Bases: TemplateView, ChatContextMixin, ReleaseNotesContextMixin

View for the admin dashboard

extra_context = {'current_menu_item': 'admin_dashboard'}[source]

The context dict passed to the template (see ContextMixin)

get_context_data(**kwargs: Any) dict[str, Any][source]

Returns a dictionary representing the template context (see get_context_data()).

Parameters:

**kwargs (Any) – The given keyword arguments

Returns:

The template context

Return type:

dict[str, Any]

only_latest_release = True[source]

Whether only the latest release notes should be included

template_name = 'dashboard/admin_dashboard.html'[source]

The template to render (see TemplateResponseMixin)

Dashboard View

class integreat_cms.cms.views.dashboard.dashboard_view.DashboardView(**kwargs)[source]

Bases: TemplateView, ChatContextMixin

View for the region dashboard

get_automatically_saved_pages() dict[str, QuerySet | str][source]

Extend context by info on automatically saved pages

Returns:

Dictionary containing the context for auto saved pages

Return type:

dict[str, QuerySet | str]

get_broken_links_context() dict[str, list[Url] | Url | AbstractContentTranslation][source]

Extend context by info on broken links

Returns:

Dictionary containing the context for broken links

Return type:

dict[str, list[Url] | Url | AbstractContentTranslation]

get_context_data(**kwargs: Any) dict[str, Any][source]

Extend context by blog urls

Parameters:

**kwargs (Any) – The supplied keyword arguments

Returns:

The context dictionary

Return type:

dict[str, Any]

get_latest_versions() list[int][source]

Collects all the latest page translations of the current region

Returns:

The ids of the latest page translations of the current region

Return type:

list[int]

get_low_hix_value_context() dict[str, QuerySet][source]

Extend context by info on pages with low hix value

Returns:

Dictionary containing the context for pages with low hix value

Return type:

dict[str, QuerySet]

get_outdated_pages_context() dict[str, QuerySet | PageTranslation | datetime | int | None][source]

Extend context by info on outdated pages

Returns:

Dictionary containing the context for outdated pages

Return type:

dict[str, QuerySet | PageTranslation | datetime | int | None]

get_unread_feedback_context() dict[str, QuerySet][source]

Extend context by info on unread feedback

Returns:

Dictionary containing the context for unreviewed pages

Return type:

dict[str, QuerySet]

get_unreviewed_pages_context() dict[str, QuerySet | str][source]

Extend context by info on unreviewed pages

Returns:

Dictionary containing the context for unreviewed pages

Return type:

dict[str, QuerySet | str]

latest_version_ids: list[int] = [][source]

The ids of the latest page translations of the current region

template_name: str = 'dashboard/dashboard.html'[source]

The template to render (see TemplateResponseMixin)

Region Selection

class integreat_cms.cms.views.dashboard.region_selection.RegionSelection(**kwargs)[source]

Bases: TemplateView

View for the region selection

get(request: HttpRequest, *args: Any, **kwargs: Any) HttpResponseRedirect[source]

Redirect to correct dashboard or render the region selection if dashboard cannot be automatically determined

Parameters:
  • request (HttpRequest) – Object representing the user call

  • *args (Any) – The supplied arguments

  • **kwargs (Any) – The supplied keyword arguments

Raises:

PermissionDenied – If user is neither superuser/staff nor a region user

Returns:

The rendered selection template or a redirect to correct dashboard

Return type:

HttpResponseRedirect

template_name = 'dashboard/region_selection.html'[source]

The template to render (see TemplateResponseMixin)