diff options
Diffstat (limited to 'docs/narr/webob.rst')
| -rw-r--r-- | docs/narr/webob.rst | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst index c4805df8d..83d096a57 100644 --- a/docs/narr/webob.rst +++ b/docs/narr/webob.rst @@ -111,8 +111,8 @@ Special Attributes Added to the Request by :app:`Pyramid` In addition to the standard :term:`WebOb` attributes, :app:`Pyramid` adds special attributes to every request: ``context``, ``registry``, -``root``, ``subpath``, ``traversed``, ``view_name``, ``virtual_root`` -, ``virtual_root_path``, ``session``, and ``tmpl_context``. These +``root``, ``subpath``, ``traversed``, ``view_name``, ``virtual_root``, +``virtual_root_path``, ``session``, and ``tmpl_context``. These attributes are documented further within the :class:`pyramid.request.Request` API documentation. @@ -183,7 +183,7 @@ only a few you'll use often: ``req.get_response(wsgi_application)``: This method calls the given WSGI application with this request, and returns a `Response`_ object. You can also use this for - subrequests or testing. + subrequests, or testing. .. index:: single: request (and unicode) @@ -203,8 +203,8 @@ attribute. If it is set, then ``req.POST``, ``req.GET``, ``req.params``, and ``req.cookies`` will contain unicode strings. Each has a -corresponding ``req.str_*`` (like ``req.str_POST``) that is always -``str`` and never unicode. +corresponding ``req.str_*`` (e.g., ``req.str_POST``) that is always +a ``str``, and never unicode. More Details ++++++++++++ @@ -213,9 +213,9 @@ More detail about the request object API is available in: - The :class:`pyramid.request.Request` API documentation. -- The `WebOb documentation <http://pythonpaste.org/webob>`_ . All +- The `WebOb documentation <http://pythonpaste.org/webob>`_. All methods and attributes of a ``webob.Request`` documented within the - WebOb documentation will work against request objects created by + WebOb documentation will work with request objects created by :app:`Pyramid`. .. index:: @@ -231,8 +231,9 @@ for its original location: ``webob.Response``. A response object has three fundamental parts: ``response.status``: - The response code plus message, like ``'200 OK'``. To set the - code without the reason, use ``response.status_int = 200``. + The response code plus reason message, like ``'200 OK'``. To set + the code without a message, use ``status_int``, i.e.: + ``response.status_int = 200``. ``response.headerlist``: A list of all the headers, like ``[('Content-Type', @@ -325,7 +326,7 @@ Exception Responses To facilitate error responses like ``404 Not Found``, the module :mod:`webob.exc` contains classes for each kind of error response. These -include boring but appropriate error bodies. The exceptions exposed by this +include boring, but appropriate error bodies. The exceptions exposed by this module, when used under :app:`Pyramid`, should be imported from the :mod:`pyramid.httpexceptions` "facade" module. This import location is merely a facade for the original location of these exceptions: ``webob.exc``. |
