fluent_dashboard.dashboard¶
Custom dashboards for Django applications.
This package defines the following classes:
These classes need to be linked in settings.py
to be loaded by django-admin-tools.
Off course, you can also extend the classes, and use those names in the settings instead.
The FluentIndexDashboard
class¶
-
class
fluent_dashboard.dashboard.
FluentIndexDashboard
(**kwargs)¶ A custom home screen for the Django admin interface.
It displays the application groups based on with FLUENT_DASHBOARD_APP_GROUPS setting. To activate the dashboard add the following to your settings.py:
ADMIN_TOOLS_INDEX_DASHBOARD = 'fluent_dashboard.dashboard.FluentIndexDashboard'
The dashboard modules are instantiated by the following functions, which can be overwritten:
get_personal_module()
get_application_modules()
get_recent_actions_module()
get_rss_modules()
get_cache_status_modules()
To have a menu which is consistent with the application groups displayed by this module, use the
FluentMenu
class to render the admin_tools menu.When overwriting this class, the elements can either be added in the
__init__()
method, or theinit_with_context()
method. For more information, see the django-admin-tools documentation.-
__init__
(**kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
get_application_modules
()¶ - Instantiate all application modules (i.e.
AppList
,AppIconList
andCmsAppIconList
) for use in the dashboard.
-
get_cache_status_modules
(request)¶ Instantiate the
CacheStatusGroup
module for use in the dashboard.This module displays the status of Varnish and Memcache, if the collowayproject/dashboardmods package is installed and the caches are configured. By default, these modules are only shown for the superuser.
-
get_personal_module
()¶ Instantiate the
PersonalModule
for use in the dashboard.
-
get_recent_actions_module
()¶ Instantiate the
RecentActions
module for use in the dashboard.
-
get_rss_modules
()¶ Instantiate the RSS modules for use in the dashboard. This module displays the RSS feeds of the collowayproject/dashboardmods package, if it is installed, and configured.
-
init_with_context
(context)¶ Sometimes you may need to access context or request variables to build your dashboard, this is what the
init_with_context()
method is for. This method is called just before the display with adjango.template.RequestContext
as unique argument, so you can access to all context variables and to thedjango.http.HttpRequest
.
The FluentAppIndexDashboard
class¶
-
class
fluent_dashboard.dashboard.
FluentAppIndexDashboard
(app_title, models, **kwargs)¶ A custom application index page for the Django admin interface.
This dashboard is displayed when one specific application is opened via the breadcrumb. It displays the models and recent actions of the specific application. To activate the dashboards add the following to your settings.py:
ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'fluent_dashboard.dashboard.FluentAppIndexDashboard'
-
__init__
(app_title, models, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
get_model_list_module
()¶ Instantiate a standard
ModelList
class to display the models of this application.
-
get_recent_actions_module
()¶ Instantiate the
RecentActions
module for use in the appliation index page.
-