This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction is component for pyramid, that provides management of menu urls.


You can install with pip.

$ pip install

Usage provides include hook.:


register and use Menu

To add menu, use add_route_menu directive.:

config.add_route('menu1', '/menus/menu1')
config.add_route('menu2', '/menus/menu2')
config.add_route_menu(menu_name="system", route_name="menu1", display_name="system menu item1")

Or use route_menu_config decorator.:

class SystemMenu3(object):
    display_name = "system menu item3"

To get menu, use get_menu API:

from import get_menu

def menu(request):
    system_menu = get_menu(request, system)
    return dict(menu=system_menu)

get_menu returns the object that provides IMenu has a property named menu_items that is list including IMenuItem.

IMenuItem has some property, display_name, name and url. Maybe you use menu items in template such as below:

<ul class="nav">
%for m in system_menu.menu_items:
    <li><a href="${m.url}">${m.display_name}</a></li>


Registering menu with permission

class SystemMenu3(object):
    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.


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”.


  • Atsushi Odagiri, Original Author


0.1 (2013-10-13)

  • first release
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (9.2 kB) Copy SHA256 Checksum SHA256 Source Oct 13, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting