From 72ad3374afb491d652e2a22951b09ca399c8d0c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 21 Jan 2011 02:01:18 -0500 Subject: - Add docs for ``add_finished_callback``, ``add_response_callback``, ``route_path``, ``route_url``, and ``static_url`` methods to ``pyramid.request.Request`` API docs. --- CHANGES.txt | 4 ++++ TODO.txt | 3 --- docs/api/request.rst | 12 ++++++++++++ docs/narr/webob.rst | 18 ++++++++++-------- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index babc95600..5c5588a45 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,6 +25,10 @@ Documentation - Added "Adding Methods to the Configurator via ``add_directive``" section to Advanced Configuration narrative chapter. +- Add docs for ``add_finished_callback``, ``add_response_callback``, + ``route_path``, ``route_url``, and ``static_url`` methods to + ``pyramid.request.Request`` API docs. + Deprecations ------------- diff --git a/TODO.txt b/TODO.txt index c267c3ea1..89301e526 100644 --- a/TODO.txt +++ b/TODO.txt @@ -19,9 +19,6 @@ Must-Have (before 1.0) well as - http://blog.abourget.net/2011/1/13/pyramid-and-mako:-how-to-do-i18n-the-pylons-way/ -- Add docs for ``route_path`` and ``route_url``, etc to Request API docs (see - also https://github.com/Pylons/pyramid/issues#issue/19). - - Figure out what to do with "Forms" chapter in narr docs. Should-Have diff --git a/docs/api/request.rst b/docs/api/request.rst index 13b434a51..912634b62 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -113,3 +113,15 @@ request, the value of this attribute will be ``None``. See :ref:`matched_route`. + .. automethod:: add_response_callback + + .. automethod:: add_finished_callback + + .. automethod:: route_url + + .. automethod:: route_path + + .. automethod:: resource_url + + .. automethod:: static_url + diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst index 83d096a57..26a40a59b 100644 --- a/docs/narr/webob.rst +++ b/docs/narr/webob.rst @@ -20,9 +20,11 @@ class, which is a subclass of :class:`webob.Request`. The Users can also return an instance of :mod:`webob.Response` directly from a view as necessary. -WebOb is a project separate from :app:`Pyramid` with a separate set -of authors and a fully separate `set of documentation -`_. +WebOb is a project separate from :app:`Pyramid` with a separate set of +authors and a fully separate `set of documentation +`_. Pyramid adds some functionality to the +standard WebOb request, which is documented in the :ref:`request_module` API +documentation. WebOb provides objects for HTTP requests and responses. Specifically it does this by wrapping the `WSGI `_ request @@ -109,11 +111,11 @@ instance, ``req.if_modified_since`` returns a `datetime 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 -attributes are documented further within the +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``, ``matchdict``, and +``matched_route``. These attributes are documented further within the :class:`pyramid.request.Request` API documentation. .. index:: -- cgit v1.2.3