当前位置: 首页>>代码示例>>Python>>正文


Python AppIndexDashboard.__init__方法代码示例

本文整理汇总了Python中admin_tools.dashboard.AppIndexDashboard.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python AppIndexDashboard.__init__方法的具体用法?Python AppIndexDashboard.__init__怎么用?Python AppIndexDashboard.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在admin_tools.dashboard.AppIndexDashboard的用法示例。


在下文中一共展示了AppIndexDashboard.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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)
        ]
开发者ID:gkrasulya,项目名称:lift-fit.ru,代码行数:9,代码来源:dashboard.py

示例2: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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
            )
        ]
开发者ID:cdr-stats,项目名称:cdr-stats,代码行数:29,代码来源:dashboard.py

示例3: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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()),
        ]
开发者ID:devsandk,项目名称:djdocskkm,代码行数:9,代码来源:dashboard.py

示例4: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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),
        ]
开发者ID:kpx13,项目名称:deliveru,代码行数:10,代码来源:dashboard.py

示例5: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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
        ))
开发者ID:18dubu,项目名称:MMS,代码行数:10,代码来源:__init__.py

示例6: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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()))
开发者ID:heinrich5991,项目名称:teerace,代码行数:13,代码来源:dashboard.py

示例7: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
 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
         )
     ]
开发者ID:UkrSoft,项目名称:net-market,代码行数:13,代码来源:dashboard.py

示例8: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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
            )
        ]
开发者ID:outrayjus,项目名称:awi,代码行数:14,代码来源:admin_dashboard.py

示例9: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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'],
            )
        ]
开发者ID:dmeehan,项目名称:gfcactivatingland,代码行数:15,代码来源:dashboard.py

示例10: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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']),
            ]
开发者ID:alekGbuz,项目名称:blog_angular_django,代码行数:16,代码来源:dashboard.py

示例11: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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),
        ]
开发者ID:bfritscher,项目名称:fablab-admin,代码行数:19,代码来源:dashboard.py

示例12: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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,
        ))
开发者ID:varikgit,项目名称:globalhome_ats,代码行数:19,代码来源:dashboard.py

示例13: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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',
                ),
            )
        ]
开发者ID:rhoerbe,项目名称:sthrep2,代码行数:19,代码来源:dashboard.py

示例14: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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
        ))
开发者ID:Prav001,项目名称:DHM-Automation,代码行数:20,代码来源:dashboard.py

示例15: __init__

# 需要导入模块: from admin_tools.dashboard import AppIndexDashboard [as 别名]
# 或者: from admin_tools.dashboard.AppIndexDashboard import __init__ [as 别名]
    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(),
        ))
开发者ID:zodiak,项目名称:django_ondev,代码行数:20,代码来源:dashboard.py


注:本文中的admin_tools.dashboard.AppIndexDashboard.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。