本文整理匯總了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
)
示例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)
示例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)
示例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
)
示例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
)
示例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
)
示例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')
示例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
)
示例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)
示例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
)
示例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
)
示例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
)