1. David Jean Louis
  2. django-admin-tools
Issue #35 resolved

Doc code causes syntax error

Alex Robbins
created an issue

The docs are for this class: http://packages.python.org/django-admin-tools/0.2.0/menu.html#admin_tools.menu.models.Menu

In the code sample it says to make a menu item this way:

{{{

!python

self.children.append( MenuItem( title='Multi level menu item', children=[ MenuItem('Child 1'), MenuItem('Child 2'), ] ), )

}}}

However, menu items have this method signature: def init(self, * kwargs): The * kwargs doesn't like the MenuItem('Child 1'). It works fine if I pass it as title='Child 1'. We need to either use keyword arguments instead of just * *kwargs, or update the docs.

Alex

Comments (1)

  1. Log in to comment