summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-04-10 22:17:19 -0600
committerBert JW Regeer <bertjw@regeer.org>2016-04-10 22:17:19 -0600
commit3f34aa05a48e5d9ae7b43f717b5ad9061effb08c (patch)
treeae2a986cb280864bf02c0042cb6639cbbf0984cd
parent4112d67d7dd987b9b34fed9b01165c01308790b6 (diff)
downloadpyramid-3f34aa05a48e5d9ae7b43f717b5ad9061effb08c.tar.gz
pyramid-3f34aa05a48e5d9ae7b43f717b5ad9061effb08c.tar.bz2
pyramid-3f34aa05a48e5d9ae7b43f717b5ad9061effb08c.zip
Update documentation in event.py for BeforeTraversal
-rw-r--r--pyramid/events.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pyramid/events.py b/pyramid/events.py
index e467e4012..35da2fa6f 100644
--- a/pyramid/events.py
+++ b/pyramid/events.py
@@ -134,12 +134,14 @@ class NewResponse(object):
class BeforeTraversal(object):
"""
An instance of this class is emitted as an :term:`event` after the
- :app:`Pyramid` :term:`router` finds a :term:`route` object but before any
- traversal or view code is executed. The instance has an attribute,
- ``request``, which is the request object generated by :app:`Pyramid`.
+ :app:`Pyramid` :term:`router` has attempted to find a :term:`route` object
+ but before any traversal or view code is executed. The instance has an
+ attribute, ``request``, which is the request object generated by
+ :app:`Pyramid`.
- Notably, the request object will have an attributed named
- ``matched_route``, which is the matched route that was found.
+ Notably, the request object **may** have an attribute named
+ ``matched_route``, which is the matched route if found. If no route
+ matched, this attribute is not available.
This class implements the :class:`pyramid.interfaces.IBeforeTraversal`
interface.
@@ -175,7 +177,7 @@ class ContextFound(object):
AfterTraversal = ContextFound # b/c as of 1.0
@implementer(IApplicationCreated)
-class ApplicationCreated(object):
+class ApplicationCreated(object):
""" An instance of this class is emitted as an :term:`event` when
the :meth:`pyramid.config.Configurator.make_wsgi_app` is
called. The instance has an attribute, ``app``, which is an
@@ -262,4 +264,3 @@ class BeforeRender(dict):
dict.__init__(self, system)
self.rendering_val = rendering_val
-