summaryrefslogtreecommitdiff
path: root/docs/narr/urldispatch.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-06-14 05:34:47 -0400
committerChris McDonough <chrism@plope.com>2011-06-14 05:34:47 -0400
commit31d78e7ea78343dcf9405a86d4d817a1efda16dc (patch)
tree53762e1b87ee7e03e2cdb12cc5b3aee7ff4b942c /docs/narr/urldispatch.rst
parenta4d5525cdbb6b7e614939b20a340b989258779ca (diff)
parentcecfc9e459166f3de13141954a61eaa2d6c905f2 (diff)
downloadpyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.tar.gz
pyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.tar.bz2
pyramid-31d78e7ea78343dcf9405a86d4d817a1efda16dc.zip
merge httpexception-utils branch
Diffstat (limited to 'docs/narr/urldispatch.rst')
-rw-r--r--docs/narr/urldispatch.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 5df1eb3af..f94ed3ba8 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -917,7 +917,7 @@ the application's startup configuration, adding the following stanza:
:linenos:
config.add_view('pyramid.view.append_slash_notfound_view',
- context='pyramid.exceptions.NotFound')
+ context='pyramid.httpexceptions.HTTPNotFound')
See :ref:`view_module` and :ref:`changing_the_notfound_view` for more
information about the slash-appending not found view and for a more general
@@ -945,14 +945,14 @@ view as the first argument to its constructor. For instance:
.. code-block:: python
:linenos:
- from pyramid.exceptions import NotFound
+ from pyramid.httpexceptions import HTTPNotFound
from pyramid.view import AppendSlashNotFoundViewFactory
def notfound_view(context, request):
return HTTPNotFound('It aint there, stop trying!')
custom_append_slash = AppendSlashNotFoundViewFactory(notfound_view)
- config.add_view(custom_append_slash, context=NotFound)
+ config.add_view(custom_append_slash, context=HTTPNotFound)
The ``notfound_view`` supplied must adhere to the two-argument view callable
calling convention of ``(context, request)`` (``context`` will be the