diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-10-31 15:58:24 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-10-31 15:58:24 +0000 |
| commit | 6db2c53850b33015faf8db627c5cf2fda00fc295 (patch) | |
| tree | 0d79456789e76ec93f95f02d72a67c3f31fd5925 | |
| parent | 4ece0349e3692a580d5887a10dc4eecb71fdc02e (diff) | |
| download | pyramid-6db2c53850b33015faf8db627c5cf2fda00fc295.tar.gz pyramid-6db2c53850b33015faf8db627c5cf2fda00fc295.tar.bz2 pyramid-6db2c53850b33015faf8db627c5cf2fda00fc295.zip | |
Comment logical parts of Router.__call__
| -rw-r--r-- | repoze/bfg/router.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/repoze/bfg/router.py b/repoze/bfg/router.py index fbc4fef75..c3580a8da 100644 --- a/repoze/bfg/router.py +++ b/repoze/bfg/router.py @@ -60,12 +60,14 @@ class Router(object): manager.push(threadlocals) try: + # setup request = Request(environ) threadlocals['request'] = request attrs = request.__dict__ attrs['registry'] = registry registry.has_listeners and registry.notify(NewRequest(request)) + # view lookup root = self.root_factory(request) attrs['root'] = root traverser = registry.queryAdapter(root, ITraverser) @@ -81,6 +83,7 @@ class Router(object): view_callable = registry.adapters.lookup( provides, IView, name=view_name, default=None) + # view execution if view_callable is None: if self.debug_notfound: msg = ( @@ -107,6 +110,7 @@ class Router(object): environ['repoze.bfg.message'] = msg response = self.notfound_view(context, request) + # response handling registry.has_listeners and registry.notify(NewResponse(response)) try: |
