diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2016-04-10 21:51:38 -0600 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2016-04-10 21:51:38 -0600 |
| commit | d4f5a87e4859cfc3959afa4d85a516f8c307ef70 (patch) | |
| tree | 2f10e7503716c1ac613293b89b5580d569c3eae7 | |
| parent | b271f2bde5d7959993c2512bbcd88505a8860e04 (diff) | |
| download | pyramid-d4f5a87e4859cfc3959afa4d85a516f8c307ef70.tar.gz pyramid-d4f5a87e4859cfc3959afa4d85a516f8c307ef70.tar.bz2 pyramid-d4f5a87e4859cfc3959afa4d85a516f8c307ef70.zip | |
Rename RouteFound to BeforeTraversal
| -rw-r--r-- | pyramid/events.py | 8 | ||||
| -rw-r--r-- | pyramid/interfaces.py | 2 | ||||
| -rw-r--r-- | pyramid/router.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/pyramid/events.py b/pyramid/events.py index 78ebf4d70..e467e4012 100644 --- a/pyramid/events.py +++ b/pyramid/events.py @@ -11,7 +11,7 @@ from pyramid.interfaces import ( INewResponse, IApplicationCreated, IBeforeRender, - IRouteFound, + IBeforeTraversal, ) class subscriber(object): @@ -130,8 +130,8 @@ class NewResponse(object): self.request = request self.response = response -@implementer(IRouteFound) -class RouteFound(object): +@implementer(IBeforeTraversal) +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 @@ -141,7 +141,7 @@ class RouteFound(object): Notably, the request object will have an attributed named ``matched_route``, which is the matched route that was found. - This class implements the :class:`pyramid.interfaces.IRouteFound` + This class implements the :class:`pyramid.interfaces.IBeforeTraversal` interface. """ diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index cf559ef06..298eaf303 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -25,7 +25,7 @@ class IContextFound(Interface): IAfterTraversal = IContextFound -class IRouteFound(Interface): +class IBeforeTraversal(Interface): """ An event type that is emitted whenever :app:`Pyramid` has found a route but before it calls any traversal or view code. See the documentation diff --git a/pyramid/router.py b/pyramid/router.py index c4b86f89d..99ea6ffa5 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -20,7 +20,7 @@ from pyramid.events import ( ContextFound, NewRequest, NewResponse, - RouteFound, + BeforeTraversal, ) from pyramid.httpexceptions import HTTPNotFound @@ -113,7 +113,7 @@ class Router(object): name=route.name, default=IRequest) - has_listeners and notify(RouteFound(request)) + has_listeners and notify(BeforeTraversal(request)) root_factory = route.factory or self.root_factory |
