diff options
| author | cewing <cris@crisewing.com> | 2016-10-22 12:35:21 -0400 |
|---|---|---|
| committer | cewing <cris@crisewing.com> | 2016-10-22 12:35:21 -0400 |
| commit | 03f6d630364a9adf438e0bd7d7b9f3bc3175f093 (patch) | |
| tree | de2aed9476c9d569375287a4ea89e9faf0f7b73a /docs/narr/urldispatch.rst | |
| parent | 1610c8fd3605f2ed481c37da27a1ce059419888a (diff) | |
| parent | e73ae375581539ed42aa97d7cd6e96e6fbd64c79 (diff) | |
| download | pyramid-03f6d630364a9adf438e0bd7d7b9f3bc3175f093.tar.gz pyramid-03f6d630364a9adf438e0bd7d7b9f3bc3175f093.tar.bz2 pyramid-03f6d630364a9adf438e0bd7d7b9f3bc3175f093.zip | |
Merge branch 'master' into issue.2614
Diffstat (limited to 'docs/narr/urldispatch.rst')
| -rw-r--r-- | docs/narr/urldispatch.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 2472ace31..9ac01e24a 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -557,7 +557,7 @@ Here is an example of a corresponding ``mypackage.views`` module: @view_config(route_name='idea') def idea_view(request): - return Response(request.matchdict['id']) + return Response(request.matchdict['idea']) @view_config(route_name='user') def user_view(request): @@ -850,7 +850,7 @@ application: from pyramid.httpexceptions import HTTPNotFound def notfound(request): - return HTTPNotFound('Not found, bro.') + return HTTPNotFound() def no_slash(request): return Response('No slash') @@ -871,7 +871,7 @@ If a request enters the application with the ``PATH_INFO`` value of However, if a request enters the application with the ``PATH_INFO`` value of ``/no_slash/``, *no* route will match, and the slash-appending not found view will not find a matching route with an appended slash. As a result, the -``notfound`` view will be called and it will return a "Not found, bro." body. +``notfound`` view will be called and it will return a "Not found" body. If a request enters the application with the ``PATH_INFO`` value of ``/has_slash/``, the second route will match. If a request enters the @@ -892,7 +892,7 @@ exactly the same job: @notfound_view_config(append_slash=True) def notfound(request): - return HTTPNotFound('Not found, bro.') + return HTTPNotFound() @view_config(route_name='noslash') def no_slash(request): |
