summaryrefslogtreecommitdiff
path: root/docs/narr/hooks.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-09-24 03:56:48 -0400
committerChris McDonough <chrism@plope.com>2011-09-24 03:56:48 -0400
commit4937d9e5280fff849b346dcf6c1833ef6fe95119 (patch)
tree69fe13b7853a3da419b03a7987e92e43753b65b5 /docs/narr/hooks.rst
parentbfb71c175bb5de7a0c22599979d269d92f12ed27 (diff)
parent9a784a4c94946872c493627e4295a26a3e608439 (diff)
downloadpyramid-4937d9e5280fff849b346dcf6c1833ef6fe95119.tar.gz
pyramid-4937d9e5280fff849b346dcf6c1833ef6fe95119.tar.bz2
pyramid-4937d9e5280fff849b346dcf6c1833ef6fe95119.zip
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/narr/hooks.rst')
-rw-r--r--docs/narr/hooks.rst16
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