diff options
| author | Chris McDonough <chrism@plope.com> | 2011-09-24 00:19:15 -0700 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-09-24 00:19:15 -0700 |
| commit | 50242db18dcafe01c755e22d6d45310bc5f5f9f3 (patch) | |
| tree | c57c9a9797e29027c027c4eb65ad4735ca7a6214 /docs/narr/hooks.rst | |
| parent | acefa30d7f2329acd545ab479fb983d988972f05 (diff) | |
| parent | 012b9762cd0b114b6afbf2d6356554b51706804a (diff) | |
| download | pyramid-50242db18dcafe01c755e22d6d45310bc5f5f9f3.tar.gz pyramid-50242db18dcafe01c755e22d6d45310bc5f5f9f3.tar.bz2 pyramid-50242db18dcafe01c755e22d6d45310bc5f5f9f3.zip | |
Merge pull request #285 from michr/012b9762
fix up all the ..note and ..warnings.
Diffstat (limited to 'docs/narr/hooks.rst')
| -rw-r--r-- | docs/narr/hooks.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 4afc0506b..3ab82ecf7 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -55,7 +55,9 @@ Here's some sample code that implements a minimal NotFound view callable: def notfound_view(request): return HTTPNotFound() -.. note:: When a NotFound view callable is invoked, it is passed a +.. note:: + + When a NotFound 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 @@ -64,7 +66,9 @@ Here's some sample code that implements a minimal NotFound view callable: ``pyramid.debug_notfound`` environment setting is true than it is when it is false. -.. warning:: When a NotFound view callable accepts an argument list as +.. warning:: + + When a NotFound 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 @@ -121,7 +125,9 @@ Here's some sample code that implements a minimal forbidden view: def forbidden_view(request): return Response('forbidden') -.. note:: When a forbidden view callable is invoked, it is passed a +.. note:: + + When a forbidden 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.HTTPForbidden` exception that caused the forbidden view to be called. The value of @@ -1100,7 +1106,9 @@ in the ``pyramid.tweens`` list will be used as the producer of the effective declared directly "below" it, ad infinitum. The "main" Pyramid request handler is implicit, and always "at the bottom". -.. note:: Pyramid's own :term:`exception view` handling logic is implemented +.. note:: + + Pyramid's own :term:`exception view` handling logic is implemented as a tween factory function: :func:`pyramid.tweens.excview_tween_factory`. If Pyramid exception view handling is desired, and tween factories are specified via the ``pyramid.tweens`` configuration setting, the |
