UNKNOWN
Project description
Introduction
rebecca.menu is component for pyramid, that provides management of menu urls.
Install
You can install rebecca.menu with pip.
$ pip install rebecca.menu
Usage
rebecca.menu provides include hook.:
config.include('rebecca.menu')
Permissions
Registering menu with permission
@route_menu_config('system') class SystemMenu3(object): route_name="menu3" display_name = "system menu item3" permission = 'menu3-permission'
get_menu check permission of request with has_permission, causes that menu_items includes menu items passed permission check.
Matchdict
If route has placeholder, the menu url fills values from request.matchdict.
config.add_route("menu1", 'menus/menu1/{testing_vars}') menu_factory.add_item(route_name="menu1", display_name="testing-menu1")
When matchdict has values for testing_vars as “that-is-testing”, menu1’s url is “menus/menu1/that-is-testing”.
Contributors
Atsushi Odagiri, Original Author
Changelog
0.1 (2013-10-13)
first release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rebecca.menu-0.1.zip
(9.2 kB
view details)