diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2013-03-09 03:15:15 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2013-03-09 03:15:15 +0200 |
| commit | cec2b05e74b3296ab8b54b9644223e08f269808b (patch) | |
| tree | f66b50b40a078f82314b15187db22f2391161722 /docs | |
| parent | 2f4bdefd18073c418ae95fe9e5a8c7b2a9d1130e (diff) | |
| download | pyramid-cec2b05e74b3296ab8b54b9644223e08f269808b.tar.gz pyramid-cec2b05e74b3296ab8b54b9644223e08f269808b.tar.bz2 pyramid-cec2b05e74b3296ab8b54b9644223e08f269808b.zip | |
consistency
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/hooks.rst | 9 | ||||
| -rw-r--r-- | docs/narr/viewconfig.rst | 2 | ||||
| -rw-r--r-- | docs/whatsnew-1.4.rst | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index d7af5ab98..d103ca1cd 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -79,7 +79,7 @@ The ``notfound_get`` view will be called when a view could not be found and the request method was ``GET``. The ``notfound_post`` view will be called when a view could not be found and the request method was ``POST``. -Like any other view, the notfound view must accept at least a ``request`` +Like any other view, the Not Found View must accept at least a ``request`` parameter, or both ``context`` and ``request``. The ``request`` is the current :term:`request` representing the denied action. The ``context`` (if used in the call signature) will be the instance of the @@ -91,7 +91,8 @@ Both :meth:`pyramid.config.Configurator.add_notfound_view` and redirect requests to slash-appended routes. See :ref:`redirecting_to_slash_appended_routes` for examples. -Here's some sample code that implements a minimal NotFound view callable: +Here's some sample code that implements a minimal :term:`Not Found View` +callable: .. code-block:: python :linenos: @@ -103,7 +104,7 @@ Here's some sample code that implements a minimal NotFound view callable: .. note:: - When a NotFound view callable is invoked, it is passed a + When a Not Found View callable is invoked, it is passed a :term:`request`. The ``exception`` attribute of the request will be an instance of the :exc:`~pyramid.httpexceptions.HTTPNotFound` exception that caused the Not Found View to be called. The value of @@ -122,7 +123,7 @@ Here's some sample code that implements a minimal NotFound view callable: .. warning:: - When a NotFound view callable accepts an argument list as + When a Not Found View callable accepts an argument list as described in :ref:`request_and_context_view_definitions`, the ``context`` passed as the first argument to the view callable will be the :exc:`~pyramid.httpexceptions.HTTPNotFound` exception instance. If diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index 9f3b91c26..96c0b88cf 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -81,7 +81,7 @@ invoked. If no view can be found with predicates which allow it to be matched up with the request, :app:`Pyramid` will return an error to the user's browser, representing a "not found" (404) page. See :ref:`changing_the_notfound_view` -for more information about changing the default notfound view. +for more information about changing the default :term:`Not Found View`. Other view configuration arguments are non-predicate arguments. These tend to modify the response of the view callable or prevent the view callable from diff --git a/docs/whatsnew-1.4.rst b/docs/whatsnew-1.4.rst index 34fda5f37..f725615f3 100644 --- a/docs/whatsnew-1.4.rst +++ b/docs/whatsnew-1.4.rst @@ -108,7 +108,7 @@ Minor Feature Additions - The static view machinery now raises rather than returns :class:`pyramid.httpexceptions.HTTPNotFound` and :class:`pyramid.httpexceptions.HTTPMovedPermanently` exceptions, so these can - be caught by the notfound view (and other exception views). + be caught by the Not Found View (and other exception views). - When there is a predicate mismatch exception (seen when no view matches for a given request due to predicates not working), the exception now contains |
