summaryrefslogtreecommitdiff
path: root/repoze/bfg/request.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-06-24 19:23:43 +0000
committerChris McDonough <chrism@agendaless.com>2009-06-24 19:23:43 +0000
commit05c02322f5a09c14f49c529d6fd885153e52c66f (patch)
treec09c43dc7b82d6cc475648c33313d1c1e495311e /repoze/bfg/request.py
parentaedb399ccb4da1d055163708894f690bb96685c0 (diff)
downloadpyramid-05c02322f5a09c14f49c529d6fd885153e52c66f.tar.gz
pyramid-05c02322f5a09c14f49c529d6fd885153e52c66f.tar.bz2
pyramid-05c02322f5a09c14f49c529d6fd885153e52c66f.zip
Merge noroutes branch to trunk.
Diffstat (limited to 'repoze/bfg/request.py')
-rw-r--r--repoze/bfg/request.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/repoze/bfg/request.py b/repoze/bfg/request.py
index 20e8070fc..932789e0a 100644
--- a/repoze/bfg/request.py
+++ b/repoze/bfg/request.py
@@ -1,3 +1,4 @@
+from zope.component import getUtility
from zope.interface import implements
from webob import Request as WebobRequest
@@ -10,6 +11,7 @@ from repoze.bfg.interfaces import IPOSTRequest
from repoze.bfg.interfaces import IPUTRequest
from repoze.bfg.interfaces import IDELETERequest
from repoze.bfg.interfaces import IHEADRequest
+from repoze.bfg.interfaces import IRequestFactories
def request_factory(environ):
try:
@@ -19,7 +21,7 @@ def request_factory(environ):
if 'bfg.routes.route' in environ:
route = environ['bfg.routes.route']
- request_factories = route.request_factories
+ request_factories = getUtility(IRequestFactories, name=route.name or '')
else:
request_factories = DEFAULT_REQUEST_FACTORIES