1. volpino
  2. django-admin-tools

Commits

Mikhail Korobov  committed 9eb0984

update more docstrings

  • Participants
  • Parent commits 279d9cf
  • Branches default

Comments (0)

Files changed (1)

File admin_tools/menu/menus.py

View file
     can declare css stylesheets and/or javascript files to include when
     rendering the menu, for example::
 
-        from admin_tools.menu.models import *
+        from admin_tools.menu import Menu
 
         class MyMenu(Menu):
             class Media:
     Here's a concrete example of a custom menu::
 
         from django.core.urlresolvers import reverse
-        from admin_tools.menu.models import *
+        from admin_tools.menu import items, Menu
 
         class MyMenu(Menu):
             def __init__(self, **kwargs):
                 super(MyMenu, self).__init__(**kwargs)
                 self.children.append(
-                    MenuItem(title='Home', url=reverse('admin:index'))
+                    items.MenuItem(title='Home', url=reverse('admin:index'))
                 )
                 self.children.append(
-                    AppListMenuItem(title='Applications')
+                    items.AppListMenuItem(title='Applications')
                 )
                 self.children.append(
-                    MenuItem(
+                    items.MenuItem(
                         title='Multi level menu item',
                         children=[
-                            MenuItem('Child 1'),
-                            MenuItem('Child 2'),
+                            items.MenuItem('Child 1'),
+                            items.MenuItem('Child 2'),
                         ]
                     ),
                 )