Commits

Mikhail Korobov  committed ce3d2ae

Forgot about menu.menus in previous commits

  • Participants
  • Parent commits 214332d

Comments (0)

Files changed (2)

File admin_tools/menu/items.py

 
     """
     title = _('Bookmarks')
+
     def __init__(self, **kwargs):
         super(Bookmarks, self).__init__(**kwargs)
         if 'bookmark' not in self.css_classes:

File admin_tools/menu/menus.py

 
     .. image:: images/menu_example.png
     """
+    template = 'admin_tools/menu/menu.html'
+    children = None
 
     class Media:
         css = ()
         js  = ()
 
     def __init__(self, **kwargs):
-        """
-        Menu constructor.
-        """
-        self.template = kwargs.get('template', 'admin_tools/menu/menu.html')
+        for key in kwargs:
+            if hasattr(self.__class__, key):
+                setattr(self, key, kwargs[key])
         self.children = kwargs.get('children', [])
 
     def init_with_context(self, context):