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()
).
- 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
- get_broken_links_context(region_slug: str) JsonResponse [source]
Extend context by info on broken links
- Returns:
Dictionary containing the context for broken links
- Parameters:
request (HttpRequest)
region_slug (str)
- Return type:
JsonResponse
- get_latest_versions() list[int] [source]
Collects all the latest page translations of the current region
- get_low_hix_value_context() dict[str, list[PageTranslation]] [source]
Extend context by info on pages with low hix value
- Returns:
Dictionary containing the context for pages with low hix value
- Return type:
- 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
- get_unreviewed_pages_context() dict[str, QuerySet | str] [source]
Extend context by info on unreviewed pages
- 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
)