add missing module authentic2.menu

This commit is contained in:
Benjamin Dauvergne 2013-06-10 11:10:31 +02:00
parent e4de2ccff6
commit e3d7fddf7a
1 changed files with 30 additions and 0 deletions

30
authentic2/menu.py Normal file
View File

@ -0,0 +1,30 @@
"""
This file was generated with the custommenu management command, it contains
the classes for the admin menu, you can customize this class as you want.
To activate your custom menu add the following to your settings.py::
ADMIN_TOOLS_MENU = 'authentic2.menu.CustomMenu'
"""
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from admin_tools.menu import items, Menu
class CustomMenu(Menu):
"""
Custom Menu for authentic2 admin site.
"""
def __init__(self, **kwargs):
Menu.__init__(self, **kwargs)
self.children += [
items.MenuItem(_('Dashboard'), reverse('admin:index')),
items.Bookmarks(),
]
def init_with_context(self, context):
"""
Use this method if you need to access the request context.
"""
return super(CustomMenu, self).init_with_context(context)