summaryrefslogtreecommitdiff
path: root/repoze/bfg/interfaces.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-09-06 00:06:48 +0000
committerChris McDonough <chrism@agendaless.com>2010-09-06 00:06:48 +0000
commiteb7ea411bfce55085449b79ac88aac19af0e232f (patch)
tree6c98b973c746d4c37a5d7f40078aefd9dd1c4d23 /repoze/bfg/interfaces.py
parent8deae21c801bc05c6464a6eead3df449ed1fe52d (diff)
downloadpyramid-eb7ea411bfce55085449b79ac88aac19af0e232f.tar.gz
pyramid-eb7ea411bfce55085449b79ac88aac19af0e232f.tar.bz2
pyramid-eb7ea411bfce55085449b79ac88aac19af0e232f.zip
- The ``repoze.bfg.interfaces.INewResponse`` interface now includes a
``request`` attribute; as a result, a handler for INewResponse now has access to the request which caused the response. - The INewResponse event is now not sent to listeners if the response returned by view code (or a renderer) is not a "real" response (e.g. if it does not have ``.status``, ``.headerlist`` and ``.app_iter`` attribtues).
Diffstat (limited to 'repoze/bfg/interfaces.py')
-rw-r--r--repoze/bfg/interfaces.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py
index 086c93f3a..86e2206e3 100644
--- a/repoze/bfg/interfaces.py
+++ b/repoze/bfg/interfaces.py
@@ -16,6 +16,7 @@ class INewRequest(Interface):
class INewResponse(Interface):
""" An event type that is emitted whenever any :mod:`repoze.bfg`
view returns a response."""
+ request = Attribute('The request object')
response = Attribute('The response object')
class IWSGIApplicationCreatedEvent(Interface):