def includeme(config): # config.add_route('route', 'abc') config.add_view('.views.route_view', route_name='route') # config.add_view( '.views.global_view', context='pyramid.traversal.DefaultRootFactory' ) config.add_view( '.views.global2_view', context='pyramid.traversal.DefaultRootFactory', name='global2', ) config.add_route('route2', 'def') # config.add_view('.views.route2_view', route_name='route2') # config.add_route('route3', 'ghi', use_global_views=True) # config.add_route('route4', 'jkl') # config.add_route('route5', 'mno/*traverse') # config.add_route('route6', 'pqr/*traverse', use_global_views=True) config.add_route('route7', 'error') config.add_view('.views.erroneous_view', route_name='route7') config.add_route('route8', 'error2') config.add_view('.views.erroneous_view', route_name='route8') # config.add_view('.views.exception_view', context=RuntimeError) # config.add_view( '.views.exception2_view', context=RuntimeError, route_name='route8' ) config.add_route('route9', 'error_sub') config.add_view('.views.erroneous_sub_view', route_name='route9') # config.add_view( '.views.exception2_view', context='.views.SuperException', route_name='route9', ) # config.add_view('.views.exception_view', context='.views.SubException')