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


Python Menu.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)

        app_menu = items.AppList(
                _('Applications'),
                exclude=('django.contrib.*',
                     'fablabadmin.base.models.ContactStatus',
                     'fablabadmin.base.models.ResourceType',
                     'fablabadmin.accounting.models.BankTransaction',
                     'filer*')
            )
        admin_menu = items.AppList(
                _('Administration'),
                models=('django.contrib.*',
                    'fablabadmin.base.models.ContactStatus',
                    'fablabadmin.base.models.ResourceType',
                    'fablabadmin.accounting.models.BankTransaction',
                    'filer*')
            )
        app_menu.children += [items.MenuItem(_('Accounting'), children=[
            items.MenuItem(_('Consolidation'), '/admin/accounting/consolidation')
        ])]

        self.children += [
            items.MenuItem(_('Dashboard'), reverse('admin:index')),
            items.Bookmarks(),
            app_menu,
            admin_menu,
            items.MenuItem(_('report bug / new feature'), 'https://github.com/bfritscher/fablab-admin/issues')

        ]
开发者ID:bfritscher,项目名称:fablab-admin,代码行数:33,代码来源:menu.py

示例2: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(
             _('Applications'),
             exclude=('django.contrib.*',)
         ),
         items.AppList(
             _('Administration'),
             models=('django.contrib.*',)
         ),
         items.ModelList(_(u'Workflow'), [
             'src.storage.models.Customer',
             'src.storage.models.Project',
             'src.storage.models.Teaser',
             ]),
         items.ModelList(_(u'Reports'), [
             'src.custom_admin.models.ActivityReport',
             'src.custom_admin.models.SalesReport',
             ]),
         items.ModelList(_(u'Finances'), [
             'src.storage.models.FinanceTransaction',
             ]),
         items.ModelList(_(u'Dictionaries'), [
             'src.storage.models.Workarea',
             'src.storage.models.JobType',
             ]),
         items.ModelList(_(u'Static Blocks'), [
             'chunks.models.Chunk',
             'chunks.models.Image',
             'chunks.models.Media',
             ]),
     ]
开发者ID:Bloodlettinger,项目名称:meandre,代码行数:37,代码来源:dashmenu.py

示例3: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children.append(items.MenuItem(
         title=_('Dashboard'),
         url=reverse('admin:index')
     ))
     self.children.append(items.AppList(
         title=_('PlaylistNow'),
         include_list=(
             'music',
             'playlist',
         )
     ))
     self.children.append(items.AppList(
         title=_('Applications'),
         exclude_list=(
             'django.contrib', 
             'pinax.apps',
             'music', 
             'playlist',
             'emailconfirmation',
             'mailer',
         )
     ))
     self.children.append(items.AppList(
         title=_('Administration'),
         include_list=(
             'django.contrib',
             'pinax.apps',
             'emailconfirmation',
             'mailer',
         )
     ))
开发者ID:HengeSense,项目名称:playlistnow.fm,代码行数:35,代码来源:menu.py

示例4: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children += [
            items.MenuItem(_('Dashboard'), reverse('admin:index')),
            items.Bookmarks("Filtros"),
            items.MenuItem(_('Users'), children=(
                items.MenuItem(_('All'), "/admin/bikeanjo/profile/"),
                items.MenuItem(_('Bike Anjos'), "/admin/bikeanjo/profile/?is_bikeanjo__exact=1"),
                items.MenuItem(_('Solicitantes'), "/admin/bikeanjo/profile/?is_bikeanjo__exact=0"),
                )
            ),
            items.MenuItem(_('Requests'), children=(
                items.MenuItem(_('All'), "/admin/bikeanjo/request/"),
                )
            ),
            items.AppList(
                _('Applications'),
                exclude=('django.contrib.*',),
            ),
            items.AppList(
                _('Administration'),
                models=('django.contrib.*',),
            ),

        ]
开发者ID:brunogola,项目名称:bikeanjo,代码行数:27,代码来源:menu.py

示例5: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children += [
            items.MenuItem(_('Dashboard'), reverse('admin:index')),
            items.AppList(
                _('Applications'),
                exclude=(
                    'django.contrib.*',
                ),
                children=[
#                    items.MenuItem(u'pages', reverse('admin:flatpages_flatpage_changelist')),
#                    items.MenuItem(u'news', reverse('admin:articles_news_changelist')),
#                    items.MenuItem(u'files', reverse('fb_browse')),
                ],
            ),
            items.AppList(
                _('Administration'),
                exclude=(
                    'django.contrib.*',
                    'articles.*',
                    'chunks.*',
                ),
                children=[
                    items.MenuItem(_(u'Users'), reverse('admin:auth_user_changelist')),
                    items.MenuItem(_(u'Groups'), reverse('admin:auth_group_changelist')),
                ]
            ),
        ]
开发者ID:signception,项目名称:django-project-skel,代码行数:30,代码来源:menu.py

示例6: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
    def __init__(self, **kwargs):
        Menu.__init__(self, **kwargs)
        self.children += [
            items.MenuItem(_('Dashboard'), reverse('admin:index')),
        ]

        # Foo
        self.children.append(items.ModelList(_('Foo'),
            models=conf.foo_apps
        ))

        # News
        self.children.append(items.ModelList(_('News'),
            models=conf.news_apps
        ))

        # Dash
        self.children.append(items.ModelList(_('Dash'),
            models=conf.dash_apps
        ))

         # Registration
        self.children.append(items.ModelList(_('Registration'),
            models=conf.registration_apps
        ))

        # append an app list module for "Administration"
        self.children.append(items.AppList(
            _('Administration'),
            models=['django.contrib.*',]
        ))
开发者ID:danrue,项目名称:django-dash,代码行数:33,代码来源:menu.py

示例7: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem("Главная", "/"),
         items.MenuItem(_("Dashboard"), reverse("admin:index")),
         items.Bookmarks(),
         items.AppList(_("Administration")),
     ]
开发者ID:dfalk,项目名称:turistproject,代码行数:10,代码来源:menu.py

示例8: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_("Dashboard"), reverse("admin:index")),
         items.Bookmarks(),
         items.AppList(_("Applications"), exclude=("django.contrib.*",)),
         items.AppList(_("Administration"), models=("django.contrib.*",)),
     ]
开发者ID:deusesx,项目名称:VDom,代码行数:10,代码来源:menu.py

示例9: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_("Dashboard"), reverse("admin:index")),
         items.Bookmarks(),
         items.AppList(_("Weblog"), models=("zinnia.*", "tagging.*", "django.contrib.comments.*")),
         items.AppList(_("Administration"), models=("django.contrib.*",), exclude=("django.contrib.comments.*",)),
     ]
开发者ID:django-blog-zinnia,项目名称:admin-tools-zinnia,代码行数:10,代码来源:menu.py

示例10: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_("Newfies-Dialer" + " V" + newfies.__version__), reverse("admin:index")),
         items.Bookmarks(),
         items.AppList(_("Applications"), exclude=("django.contrib.*",)),
         items.AppList(_("Administration"), models=("django.contrib.*",)),
         items.MenuItem(_("Customer Panel"), reverse("admin:index") + "../"),
     ]
开发者ID:nemmik,项目名称:newfies-dialer,代码行数:11,代码来源:menu.py

示例11: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(
             _('Applications'),
         ),
     ]
开发者ID:and-nothing-else,项目名称:marketplace,代码行数:11,代码来源:menu.py

示例12: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.Bookmarks(),
         items.AppList(_('Applications'), exclude=('django.contrib.*', )),
         items.AppList(_('Administration'), models=('django.contrib.*', )),
         items.MenuItem(
             'Current Activity',
             children=[
                 items.MenuItem('Logged-in users',
                                '/current_activity/active_users/'),
                 items.MenuItem('Current translations',
                                '/current_activity/current_translations/'),
                 items.MenuItem('Translations with maximum hops',
                                '/current_activity/translations_max_hops/'),
                 items.MenuItem('Translations with minimum hops',
                                '/current_activity/translations_min_hops/'),
                 items.MenuItem('Total sentences translated',
                                '/current_activity/total_translations/'),
                 items.MenuItem('Average translation rate',
                                '/current_activity/avg_translation_rate/'),
                 items.MenuItem('Average convergence rate',
                                '/current_activity/avg_convergence_rate/'),
                 #items.MenuItem('Microtask similarity score', '/current_activity/microtask_similarity_score/')
             ]),
         items.MenuItem(
             'Background Tasks',
             children=[
                 items.MenuItem('Populate Subtask',
                                '/background_task/populate_subtask/'),
                 items.MenuItem(
                     'Populate StaticMicrotask',
                     '/background_task/populate_staticmicrotask/'),
                 items.MenuItem('Populate Microtask',
                                '/background_task/populate_microtask/'),
                 items.MenuItem('Unassign Microtask',
                                '/background_task/unassign_microtask/'),
                 items.MenuItem('Upload Priviledge',
                                '/background_task/upload_priviledge/'),
                 items.MenuItem(
                     'Update Weekly Leaderboard',
                     '/background_task/update_weekly_leaderboard/'),
                 items.MenuItem(
                     'Update Overall Leaderboard',
                     '/background_task/update_overall_leaderboard/'),
                 items.MenuItem(
                     'Update Statistics Counter',
                     '/background_task/update_statistics_counter/'),
                 items.MenuItem('Document Stability',
                                '/background_task/document_stability/'),
                 items.MenuItem('Reputation Score',
                                '/background_task/reputation_score/'),
                 items.MenuItem('Assign Rank',
                                '/background_task/assign_rank/')
             ]),
     ]
开发者ID:reenakabra,项目名称:bhagirath,代码行数:59,代码来源:menu.py

示例13: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.MenuItem(_('Tools'),
             children=[
                 items.MenuItem('PUBLISH', reverse('publish')),
             ]
         )
     ]
开发者ID:CodyPitts,项目名称:cocktail-summit-project,代码行数:12,代码来源:cocktailmenu.py

示例14: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children.append(items.MenuItem(
         title=u'Main',
         url=reverse('admin:index')
     ))
     self.children.append(items.Bookmarks(title=u'Bookmarks'))
     self.children.append(items.MenuItem(
         title=u'Goto site',
         url='/'
     ))
开发者ID:pombredanne,项目名称:dworkin,代码行数:13,代码来源:menu.py

示例15: __init__

# 需要导入模块: from admin_tools.menu import Menu [as 别名]
# 或者: from admin_tools.menu.Menu import __init__ [as 别名]
 def __init__(self, **kwargs):
     Menu.__init__(self, **kwargs)
     self.children += [
         items.MenuItem(_('Dashboard'), reverse('admin:index')),
         items.AppList(
             _('Administration'),
         ),
         items.MenuItem(_('Sentry'), reverse('sentry')),
         items.MenuItem(_('Go to site'), reverse('main:index')),
         items.MenuItem(_('Forum'), reverse('forum:index')),
     ]
开发者ID:BergSoft,项目名称:djbookru,代码行数:13,代码来源:menu.py


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