summaryrefslogtreecommitdiff
path: root/repoze/bfg/interfaces.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-07-24 07:04:49 +0000
committerChris McDonough <chrism@agendaless.com>2010-07-24 07:04:49 +0000
commit81a833da2adff04d11b9228406bbc1528be65c64 (patch)
tree736765ad3018e4b9e432b4af4bb923fdbdcc898f /repoze/bfg/interfaces.py
parent8e18ea4a560b4456ace86bdef6060304de053238 (diff)
downloadpyramid-81a833da2adff04d11b9228406bbc1528be65c64.tar.gz
pyramid-81a833da2adff04d11b9228406bbc1528be65c64.tar.bz2
pyramid-81a833da2adff04d11b9228406bbc1528be65c64.zip
- A new method of the ``Configurator`` exists:
``set_request_factory``. If used, this method will set the factory used by the :mod:`repoze.bfg` router to create all request objects. - The ``Configurator`` constructor takes an additional argument: ``request_factory``. If used, this argument will set the factory used by the :mod:`repoze.bfg` router to create all request objects. - The ``Hooks`` narrative chapter now contains a section about changing the request factory.
Diffstat (limited to 'repoze/bfg/interfaces.py')
-rw-r--r--repoze/bfg/interfaces.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py
index 814e558f6..992ec80d9 100644
--- a/repoze/bfg/interfaces.py
+++ b/repoze/bfg/interfaces.py
@@ -87,6 +87,16 @@ class IResponseFactory(Interface):
should accept all the arguments that the webob.Response class
accepts)"""
+class IRequestFactory(Interface):
+ """ A utility which generates a request """
+ def __call__(environ):
+ """ Return an object implementing IRequest, e.g. an instance
+ of ``repoze.bfg.request.Request``"""
+
+ def blank(path):
+ """ Return an empty request object (see
+ ``webob.Request.blank``)"""
+
class IViewClassifier(Interface):
""" *Internal only* marker interface for views."""