summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorDariusz Górecki <darek.krk@gmail.com>2016-08-10 11:10:49 +0100
committerDariusz Górecki <darek.krk@gmail.com>2016-08-10 11:10:49 +0100
commitf2f196db97462d5d19253d261cb2167fd19c1108 (patch)
tree8f14e42096c343b57d4ccae486dea0309bad4b49 /docs/narr
parentc0ddbc37530042119539b60245e2e2a4fccc83c0 (diff)
parenta69db3dc7c57f318308434905ee96e23d0c0d3df (diff)
downloadpyramid-f2f196db97462d5d19253d261cb2167fd19c1108.tar.gz
pyramid-f2f196db97462d5d19253d261cb2167fd19c1108.tar.bz2
pyramid-f2f196db97462d5d19253d261cb2167fd19c1108.zip
Merge branch 'master' into extract_http_basic
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/hooks.rst8
-rw-r--r--docs/narr/urldispatch.rst6
2 files changed, 7 insertions, 7 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst
index 49ef29d3f..c54b213f1 100644
--- a/docs/narr/hooks.rst
+++ b/docs/narr/hooks.rst
@@ -26,7 +26,7 @@ Not Found View by using the
:linenos:
def notfound(request):
- return Response('Not Found, dude', status='404 Not Found')
+ return Response('Not Found', status='404 Not Found')
def main(globals, **settings):
config = Configurator()
@@ -45,7 +45,7 @@ and a :term:`scan`, you can replace the Not Found View by using the
@notfound_view_config()
def notfound(request):
- return Response('Not Found, dude', status='404 Not Found')
+ return Response('Not Found', status='404 Not Found')
def main(globals, **settings):
config = Configurator()
@@ -67,11 +67,11 @@ Views can carry predicates limiting their applicability. For example:
@notfound_view_config(request_method='GET')
def notfound_get(request):
- return Response('Not Found during GET, dude', status='404 Not Found')
+ return Response('Not Found during GET', status='404 Not Found')
@notfound_view_config(request_method='POST')
def notfound_post(request):
- return Response('Not Found during POST, dude', status='404 Not Found')
+ return Response('Not Found during POST', status='404 Not Found')
def main(globals, **settings):
config = Configurator()
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 7d37c04df..9ac01e24a 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -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):