def get_application_modules(self): """ Instantiate all application modules (i.e. :class:`~admin_tools.dashboard.modules.AppList`, :class:`~fluent_dashboard.modules.AppIconList` and :class:`~fluent_dashboard.modules.CmsAppIconList`) for use in the dashboard. """ modules = [] appgroups = get_application_groups() for title, kwargs in appgroups: AppListClass = get_class(kwargs.pop('module')) #e.g. CmsAppIconlist, AppIconlist, Applist modules.append(AppListClass(title, **kwargs)) return modules
def init_with_context(self, context): """ Initialize the menu items. """ site_name = get_admin_site_name(context) self.children += [ items.MenuItem(_('Dashboard'), reverse('{0}:index'.format(site_name))), items.Bookmarks(), ] for title, kwargs in get_application_groups(): self.children.append(CmsModelList(title, **kwargs)) self.children += [ReturnToSiteItem()]
def init_with_context(self, context): """ Initialize the menu items. """ site_name = get_admin_site_name(context) self.children += [ items.MenuItem(_('Dashboard'), reverse('{0}:index'.format(site_name))), items.Bookmarks(), ] for title, kwargs in get_application_groups(): self.children.append(CmsModelList(title, **kwargs)) self.children += [ ReturnToSiteItem() ]