3 from django
.core
.urlresolvers
import reverse
4 from django
.utils
.translation
import ugettext_lazy
as _
5 from admin_tools
.menu
import items
, Menu
7 class CustomMenu(Menu
):
9 Custom Menu for sep admin site.
11 def __init__(self
, **kwargs
):
12 Menu
.__init__(self
, **kwargs
)
13 self
.children
.append(items
.MenuItem(
15 url
=reverse('admin:index')
17 self
.children
.append(items
.AppList(
18 title
=_('Applications'),
19 exclude_list
=('django.contrib',)
21 self
.children
.append(items
.AppList(
22 title
=_('Administration'),
23 include_list
=('django.contrib',)
25 self
.children
.append(items
.MenuItem(
30 def init_with_context(self
, context
):
32 Use this method if you need to access the request context.