summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/src/authorization
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-06-11 05:35:27 -0400
committerChris McDonough <chrism@plope.com>2011-06-11 05:35:27 -0400
commit99edc51a3b05309c7f5d98ff96289ec51b1d7660 (patch)
treec8ddaa62b21c54eb996f5e375abd5bf9f5198806 /docs/tutorials/wiki2/src/authorization
parentdf15ed98612e7962e3122da52d8d5f5b9d8882b2 (diff)
downloadpyramid-99edc51a3b05309c7f5d98ff96289ec51b1d7660.tar.gz
pyramid-99edc51a3b05309c7f5d98ff96289ec51b1d7660.tar.bz2
pyramid-99edc51a3b05309c7f5d98ff96289ec51b1d7660.zip
- Pyramid now expects Response objects to have a __call__
method which implements the WSGI application interface instead of the three webob attrs status, headerlist and app_iter. Backwards compatibility exists for code which returns response objects that do not have a __call__. - pyramid.response.Response is no longer an exception (and therefore cannot be raised in order to generate a response). - Changed my mind about moving stuff from pyramid.httpexceptions to pyramid.response. The stuff I moved over has been moved back to pyramid.httpexceptions.
Diffstat (limited to 'docs/tutorials/wiki2/src/authorization')
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/__init__.py2
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/login.py2
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/views.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py b/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py
index 42013622c..4cd84eda5 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/__init__.py
@@ -39,7 +39,7 @@ def main(global_config, **settings):
config.add_view('tutorial.views.edit_page', route_name='edit_page',
renderer='tutorial:templates/edit.pt', permission='edit')
config.add_view('tutorial.login.login',
- context='pyramid.response.HTTPForbidden',
+ context='pyramid.httpexceptions.HTTPForbidden',
renderer='tutorial:templates/login.pt')
return config.make_wsgi_app()
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/login.py b/docs/tutorials/wiki2/src/authorization/tutorial/login.py
index 2bc8a7201..7a1d1f663 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/login.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/login.py
@@ -1,4 +1,4 @@
-from pyramid.response import HTTPFound
+from pyramid.httpexceptions import HTTPFound
from pyramid.security import remember
from pyramid.security import forget
from pyramid.url import route_url
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/views.py b/docs/tutorials/wiki2/src/authorization/tutorial/views.py
index ed441295c..5abd8391e 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/views.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/views.py
@@ -2,7 +2,7 @@ import re
from docutils.core import publish_parts
-from pyramid.response import HTTPFound
+from pyramid.httpexceptions import HTTPFound
from pyramid.security import authenticated_userid
from pyramid.url import route_url