本文整理汇总了Python中admin_tools.dashboard.AppIndexDashboard类的典型用法代码示例。如果您正苦于以下问题:Python AppIndexDashboard类的具体用法?Python AppIndexDashboard怎么用?Python AppIndexDashboard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AppIndexDashboard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
modules.ModelList(self.app_title, self.models)
]
示例2: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# TODO: Find a better way for this
if str(self.app_title) == 'Voip_Gateway':
app_title = _('voip gateway')
models = ['voip_gateway.*']
elif str(self.app_title) == 'Voip_Billing':
app_title = _('Voip Billing')
models = ['voip_billing.*']
elif str(self.app_title) == 'Cdr_Alert':
app_title = _('CDR Alert')
models = ['cdr_alert.*']
else:
app_title = self.app_title
models = self.models
# append a model list module and a recent actions module
self.children += [
# modules.ModelList(self.app_title, self.models),
modules.ModelList(app_title, models),
modules.RecentActions(
_('recent actions').title(),
include_list=self.get_app_content_types(),
limit=5
)
]
示例3: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
self.children += [
modules.ModelList(self.app_title, self.models),
modules.RecentActions(include_list=self.get_app_content_types()),
]
示例4: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
modules.ModelList(self.app_title, self.models),
modules.RecentActions(_("Recent Actions"), include_list=self.get_app_content_types(), limit=5),
]
示例5: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
self.children.append(modules.RecentActions(
_('Recent Actions'),
include_list=self.get_app_content_types(),
limit=10
))
示例6: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# we disable title because its redundant with the model list module
self.title = ""
# append a model list module
self.children.append(modules.ModelList(title=self.app_title, models=self.models))
# append a recent actions module
self.children.append(modules.RecentActions(title="Recent Actions", include_list=self.get_app_content_types()))
示例7: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
self.children = CustomIndexDashboard().children
# append a model list module and a recent actions module
self.children += [
modules.RecentActions(
_('Recent Actions'),
include_list=self.get_app_content_types(),
limit=10
)
]
示例8: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
modules.ModelList(self.app_title, self.models),
modules.RecentActions(
_('Recent Actions (This App)'),
include_list=self.models,
limit=20
)
]
示例9: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
modules.ModelList(self.app_title, self.models, css_classes=['column_1'],),
modules.RecentActions(
title=_('Recent Actions'),
include_list=self.get_app_content_types(),
limit=5,
css_classes=['column_2'],
)
]
示例10: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
if self.app_title==u'Блог':
self.children += [
modules.ModelList(self.app_title, ['blog.models.BlogCategory','blog.models.BlogArticle',
'blog.models.BlogSearching']),
]
if self.app_title == u'Настройки сайта':
self.children += [
modules.ModelList(self.app_title, ['site_utils.models.SiteProfile','site_utils.models.SiteMessages',
'site_utils.models.SitePage']),
]
示例11: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
modules.ModelList(
self.app_title,
self.models,
exclude=(
"django.contrib.*",
"fablabadmin.base.models.ContactStatus",
"fablabadmin.base.models.ResourceType",
"filer*",
),
),
RecentActions(_("Recent Actions"), include_list=self.get_app_content_types(), limit=20),
]
示例12: __init__
def __init__(self, app_title, models, **kwargs):
AppIndexDashboard.__init__(self, app_title, models, **kwargs)
# append a model list module that lists all models
# for the app and a recent actions module for the current app
self.children += [
# modules.ModelList(self.app_title, self.models),
modules.RecentActions(
include_list=self.get_app_content_types(),
limit=5
)
]
# append a model list module
self.children.append(MyDashboardAppList(
include_list=self.models,
))
示例13: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# append a model list module and a recent actions module
self.children += [
#modules.ModelList(self.app_title, self.models),
modules.ModelList(
title='Repository Manager',
models=('requmgr.models.FeatureGroup',
'requmgr.models.Requirement',
'testmgr.models.SamlProfile',
'testmgr.models.TestPlan',
'testmgr.models.Operation',
'testmgr.models.TestConfig',
),
)
]
示例14: __init__
def __init__(self, *args, **kwargs):
AppIndexDashboard.__init__(self, *args, **kwargs)
# we disable title because its redundant with the model list module
self.title = ''
if self.app_title == 'Auth':
self.app_title = u'Авторизация и аутентификация'
# append a model list module
self.children.append(modules.ModelList(
title=self.app_title,
include_list=self.models,
))
# append a recent actions module
self.children.append(modules.RecentActions(
title=_('Recent Actions'),
include_list=self.get_app_content_types(),
))
示例15: __init__
def __init__(self, **kwargs):
AppIndexDashboard.__init__(self, **kwargs)
# we don't want a title, it's redundant
self.title = ''
# append a model list module that lists all models
# for the app
self.children.append(ModelListDashboardModule(
title=self.app_title,
include_list=self.models,
))
# append a recent actions module for the current app
self.children.append(RecentActionsDashboardModule(
title=_('Recent Actions'),
include_list=self.models,
limit=5
))