summaryrefslogtreecommitdiff
path: root/docs/narr/hooks.rst
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-11-30 19:46:45 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-11-30 19:46:45 -0700
commit031d9f20baee7f57534a805809ac6a11319330ce (patch)
tree9ab03b9fca24b5542441649eecf287f9e9f48e92 /docs/narr/hooks.rst
parent3f0f1a7c9e0177352023bbe67b1eddf9185d759a (diff)
parent5238ae329fb70e5e386db0b127d958c8523d7247 (diff)
downloadpyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.gz
pyramid-031d9f20baee7f57534a805809ac6a11319330ce.tar.bz2
pyramid-031d9f20baee7f57534a805809ac6a11319330ce.zip
Merge https://github.com/Pylons/pyramid
Diffstat (limited to 'docs/narr/hooks.rst')
-rw-r--r--docs/narr/hooks.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst
index 2bb66e559..ada96f897 100644
--- a/docs/narr/hooks.rst
+++ b/docs/narr/hooks.rst
@@ -54,7 +54,8 @@ class as the ``context`` of the view configuration.
<view
view="helloworld.views.notfound_view"
- context="pyramid.exceptions.NotFound"/>
+ context="pyramid.exceptions.NotFound"
+ />
Replace ``helloworld.views.notfound_view`` with the Python dotted name
to the notfound view you want to use.
@@ -142,7 +143,8 @@ class as the ``context`` of the view configuration.
<view
view="helloworld.views.notfound_view"
- context="pyramid.exceptions.Forbidden"/>
+ context="pyramid.exceptions.Forbidden"
+ />
Replace ``helloworld.views.forbidden_view`` with the Python
dotted name to the forbidden view you want to use.
@@ -203,7 +205,7 @@ change the default traverser:
factory="myapp.traversal.Traverser"
provides="pyramid.interfaces.ITraverser"
for="*"
- />
+ />
In the example above, ``myapp.traversal.Traverser`` is assumed to be
a class that implements the following interface:
@@ -254,7 +256,7 @@ traverser would be used. For example:
factory="myapp.traversal.Traverser"
provides="pyramid.interfaces.ITraverser"
for="myapp.models.MyRoot"
- />
+ />
If the above stanza was added to a ``configure.zcml`` file,
:app:`Pyramid` would use the ``myapp.traversal.Traverser`` only
@@ -287,7 +289,7 @@ of :term:`context` by adding an adapter stanza for
factory="myapp.traversal.URLGenerator"
provides="pyramid.interfaces.IContextURL"
for="myapp.models.MyRoot *"
- />
+ />
In the above example, the ``myapp.traversal.URLGenerator`` class will
be used to provide services to :func:`pyramid.url.model_url` any