本文整理匯總了Python中treemenus.models.Menu.root_item方法的典型用法代碼示例。如果您正苦於以下問題:Python Menu.root_item方法的具體用法?Python Menu.root_item怎麽用?Python Menu.root_item使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類treemenus.models.Menu
的用法示例。
在下文中一共展示了Menu.root_item方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run
# 需要導入模塊: from treemenus.models import Menu [as 別名]
# 或者: from treemenus.models.Menu import root_item [as 別名]
#.........這裏部分代碼省略.........
treemenus_menuitem_3.level = 1
treemenus_menuitem_3.rank = 4
treemenus_menuitem_3.menu = treemenus_menu_1
treemenus_menuitem_3.save()
treemenus_menuitem_4 = MenuItem()
treemenus_menuitem_4.parent = treemenus_menuitem_1
treemenus_menuitem_4.caption = u'Admisiones'
treemenus_menuitem_4.url = u''
treemenus_menuitem_4.named_url = u'admision-index '
treemenus_menuitem_4.level = 1
treemenus_menuitem_4.rank = 3
treemenus_menuitem_4.menu = treemenus_menu_1
treemenus_menuitem_4.save()
treemenus_menuitem_5 = MenuItem()
treemenus_menuitem_5.parent = treemenus_menuitem_1
treemenus_menuitem_5.caption = u'Examenes'
treemenus_menuitem_5.url = u''
treemenus_menuitem_5.named_url = u'examen-index '
treemenus_menuitem_5.level = 1
treemenus_menuitem_5.rank = 2
treemenus_menuitem_5.menu = treemenus_menu_1
treemenus_menuitem_5.save()
treemenus_menuitem_6 = MenuItem()
treemenus_menuitem_6.parent = treemenus_menuitem_1
treemenus_menuitem_6.caption = u'Inicio'
treemenus_menuitem_6.url = u''
treemenus_menuitem_6.named_url = u'home'
treemenus_menuitem_6.level = 1
treemenus_menuitem_6.rank = 0
treemenus_menuitem_6.menu = treemenus_menu_1
treemenus_menuitem_6.save()
treemenus_menuitem_7 = MenuItem()
treemenus_menuitem_7.parent = treemenus_menuitem_1
treemenus_menuitem_7.caption = u'Pacientes'
treemenus_menuitem_7.url = u''
treemenus_menuitem_7.named_url = u'persona-index'
treemenus_menuitem_7.level = 1
treemenus_menuitem_7.rank = 1
treemenus_menuitem_7.menu = treemenus_menu_1
treemenus_menuitem_7.save()
treemenus_menuitem_8 = MenuItem()
treemenus_menuitem_8.parent = treemenus_menuitem_1
treemenus_menuitem_8.caption = u'B\xfasqueda'
treemenus_menuitem_8.url = u''
treemenus_menuitem_8.named_url = u'haystack_search'
treemenus_menuitem_8.level = 1
treemenus_menuitem_8.rank = 5
treemenus_menuitem_8.menu = treemenus_menu_1
treemenus_menuitem_8.save()
treemenus_menuitem_9 = MenuItem()
treemenus_menuitem_9.parent = treemenus_menuitem_2
treemenus_menuitem_9.caption = u'Agregar Examen'
treemenus_menuitem_9.url = u''
treemenus_menuitem_9.named_url = u'examen-agregar persona.id'
treemenus_menuitem_9.level = 1
treemenus_menuitem_9.rank = 0
treemenus_menuitem_9.menu = treemenus_menu_2
treemenus_menuitem_9.save()
treemenus_menuitem_10 = MenuItem()
treemenus_menuitem_10.parent = treemenus_menuitem_2
treemenus_menuitem_10.caption = u'Ver Datos Personales'
treemenus_menuitem_10.url = u''
treemenus_menuitem_10.named_url = u'persona-view-id persona.id'
treemenus_menuitem_10.level = 1
treemenus_menuitem_10.rank = 1
treemenus_menuitem_10.menu = treemenus_menu_2
treemenus_menuitem_10.save()
treemenus_menuitem_11 = MenuItem()
treemenus_menuitem_11.parent = treemenus_menuitem_2
treemenus_menuitem_11.caption = u'Examenes'
treemenus_menuitem_11.url = u''
treemenus_menuitem_11.named_url = u'examen-persona-lista persona.id'
treemenus_menuitem_11.level = 1
treemenus_menuitem_11.rank = 2
treemenus_menuitem_11.menu = treemenus_menu_2
treemenus_menuitem_11.save()
treemenus_menuitem_12 = MenuItem()
treemenus_menuitem_12.parent = treemenus_menuitem_2
treemenus_menuitem_12.caption = u'Admitir Paciente'
treemenus_menuitem_12.url = u''
treemenus_menuitem_12.named_url = u'admision-persona-agregar persona.id'
treemenus_menuitem_12.level = 1
treemenus_menuitem_12.rank = 3
treemenus_menuitem_12.menu = treemenus_menu_2
treemenus_menuitem_12.save()
treemenus_menu_1.root_item = treemenus_menuitem_1
treemenus_menu_1.save()
treemenus_menu_2.root_item = treemenus_menuitem_2
treemenus_menu_2.save()