1from pyramid.httpexceptions import HTTPException 2 3def includeme(config): 4 config.add_route('route_raise_exception', 'route_raise_exception') 5 config.add_route('route_raise_httpexception', 'route_raise_httpexception') 6 config.add_route('route_raise_exception2', 'route_raise_exception2', 7 factory='.models.route_factory') 8 config.add_route('route_raise_exception3', 'route_raise_exception3', 9 factory='.models.route_factory2') 10 config.add_route('route_raise_exception4', 'route_raise_exception4') 11 config.add_view('.views.maybe') 12 config.add_view('.views.no', context='.models.NotAnException') 13 config.add_view('.views.yes', context=".models.AnException") 14 config.add_view('.views.raise_exception', name='raise_exception') 15 config.add_view('.views.raise_exception', 16 route_name='route_raise_exception') 17 config.add_view('.views.raise_exception', 18 route_name='route_raise_exception2') 19 config.add_view('.views.raise_exception', 20 route_name='route_raise_exception3') 21 config.add_view('.views.whoa', context='.models.AnException', 22 route_name='route_raise_exception3') 23 config.add_view('.views.raise_exception', 24 route_name='route_raise_exception4') 25 config.add_view('.views.whoa', context='.models.AnException', 26 route_name='route_raise_exception4') 27 config.add_view('.views.raise_httpexception', 28 route_name='route_raise_httpexception') 29 config.add_view('.views.catch_httpexception', context=HTTPException) 30 31 32