本文整理汇总了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')
]
示例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',
]),
]
示例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',
)
))
示例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.*',),
),
]
示例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')),
]
),
]
示例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.*',]
))
示例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")),
]
示例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.*",)),
]
示例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.*",)),
]
示例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") + "../"),
]
示例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'),
),
]
示例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/')
]),
]
示例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')),
]
)
]
示例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='/'
))
示例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')),
]