當前位置: 首頁>>代碼示例>>Python>>正文


Python menu.MenuItem方法代碼示例

本文整理匯總了Python中wagtail.wagtailadmin.menu.MenuItem方法的典型用法代碼示例。如果您正苦於以下問題:Python menu.MenuItem方法的具體用法?Python menu.MenuItem怎麽用?Python menu.MenuItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在wagtail.wagtailadmin.menu的用法示例。


在下文中一共展示了menu.MenuItem方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: register_oscar_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_oscar_menu_item():
    return MenuItem(
        'Oscar dashboard', reverse('dashboard:index'),
        classnames='icon icon-redirect', order=10000
    ) 
開發者ID:pgovers,項目名稱:oscar-wagtail-demo,代碼行數:7,代碼來源:wagtail_hooks.py

示例2: register_frank_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_frank_menu_item():
    return MenuItem(
        'Oscar', reverse('dashboard:index'),
        classnames='icon icon-cogs', order=10000) 
開發者ID:LabD,項目名稱:django-oscar-wagtail,代碼行數:6,代碼來源:wagtail_hooks.py

示例3: register_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_menu_item():
  return MenuItem('Backup DB & Media', reverse('wagtail_backup_view'), classnames='icon icon-download', order=10000) 
開發者ID:timonweb,項目名稱:django-dbbackup-ui,代碼行數:4,代碼來源:wagtail_hooks.py

示例4: register_menu_settings

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_menu_settings():
    return MenuItem(
        'Relevancy',
        urlresolvers.reverse('wagtailrelevancy'),
        classnames='icon icon-doc-full',
        order=250
    ) 
開發者ID:takeflight,項目名稱:wagtail-relevancy,代碼行數:9,代碼來源:wagtail_hooks.py

示例5: register_styleguide_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_styleguide_menu_item():
    return MenuItem(
        _('Analytics'),
        urlresolvers.reverse('wagalytics_dashboard'),
        classnames='icon icon-fa-bar-chart',
        order=1000
    ) 
開發者ID:tomdyson,項目名稱:wagalytics,代碼行數:9,代碼來源:wagtail_hooks.py

示例6: register_images_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_images_menu_item():
    return MenuItem(
        _('Videos'), urlresolvers.reverse('wagtailvideos:index'),
        name='videos', classnames='icon icon-media', order=300
    ) 
開發者ID:takeflight,項目名稱:wagtailvideos,代碼行數:7,代碼來源:wagtail_hooks.py

示例7: _create_moderate_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def _create_moderate_menu_item(self, config):
        """Create a submenu item for the moderate admin page."""
        url = reverse('wagtailsocialfeed:moderate', kwargs={'pk': config.pk})
        return MenuItem(six.text_type(config), url,
                        classnames='icon icon-folder-inverse') 
開發者ID:LUKKIEN,項目名稱:wagtailsocialfeed,代碼行數:7,代碼來源:wagtail_hooks.py

示例8: register_inventory_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_inventory_menu_item():
    return MenuItem(
        'Block Inventory',
        reverse('wagtailinventory:search'),
        classnames='icon icon-placeholder',
        order=11000
    ) 
開發者ID:cfpb,項目名稱:wagtail-inventory,代碼行數:9,代碼來源:wagtail_hooks.py

示例9: register_flags_menu

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_flags_menu():
    return MenuItem('Flags', reverse('flagadmin:list'),
                    classnames='icon icon-tag', order=10000) 
開發者ID:cfpb,項目名稱:wagtail-flags,代碼行數:5,代碼來源:wagtail_hooks.py

示例10: register_export_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_export_menu_item():
    return MenuItem(
        'Export content',
        reverse('export-content',),
        classnames='icon icon-collapse-down',
        order=1100
    ) 
開發者ID:nhsuk,項目名稱:nhsuk-content-store,代碼行數:9,代碼來源:wagtail_hooks.py

示例11: register_import_menu_item

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_import_menu_item():
    return MenuItem(
        'Import content',
        reverse('import-content',),
        classnames='icon icon-collapse-up',
        order=1200
    ) 
開發者ID:nhsuk,項目名稱:nhsuk-content-store,代碼行數:9,代碼來源:wagtail_hooks.py

示例12: register_menu_settings

# 需要導入模塊: from wagtail.wagtailadmin import menu [as 別名]
# 或者: from wagtail.wagtailadmin.menu import MenuItem [as 別名]
def register_menu_settings():
    return MenuItem(
        _('Link Checker'),
        urlresolvers.reverse('wagtaillinkchecker'),
        classnames='icon icon-link',
        order=300
    ) 
開發者ID:takeflight,項目名稱:wagtail-linkchecker,代碼行數:9,代碼來源:wagtail_hooks.py


注:本文中的wagtail.wagtailadmin.menu.MenuItem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。