From a53cbfbb503010d34c9c02fdaf6eccc56361c7a2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 2 Nov 2009 02:31:31 +0000 Subject: - "What's New in ``repoze.bfg`` 1.1" document added to narrative documentation. - Minor typo fixes. --- docs/narr/urldispatch.rst | 2 +- docs/narr/views.rst | 68 +++++++++++++++++++++++------------------------ 2 files changed, 35 insertions(+), 35 deletions(-) (limited to 'docs/narr') diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index e2031ec4e..dd20ae7f4 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -87,7 +87,7 @@ view xhr - Thie value should be either ``True`` or ``False``. If this value is + This value should be either ``True`` or ``False``. If this value is specified and is ``True``, the :term:`request` must possess an ``HTTP_X_REQUESTED_WITH`` (aka ``X-Requested-With``) header for this route to match. This is useful for detecting AJAX requests issued diff --git a/docs/narr/views.rst b/docs/narr/views.rst index e17f3d201..88ae12764 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -210,7 +210,7 @@ View configuration can vary the renderer associated with a view via the ``renderer`` attribute. For example, this ZCML associates the ``json`` renderer with a view: -.. code-block:: python +.. code-block:: xml :linenos: `` declaration (see + :ref:`urldispatch_chapter`) that must match before this view will be + called. The ```` declaration specified by ``route_name`` must + exist in ZCML before the view that names the route + (XML-ordering-wise) . Note that the ```` declaration + referred to by ``route_name`` usually has a ``*traverse`` token in + the value of its ``path`` attribute, representing a part of the path + that will be used by traversal against the result of the route's + :term:`root factory`. See :ref:`hybrid_chapter` for more + information on using this advanced feature. + +request_type + + This value should be a Python dotted-path string representing the + :term:`interface` that the :term:`request` must have in order for + this view to be found and called. See + :ref:`view_request_types_section` for more information about request + types. For backwards compatibility with :mod:`repoze.bfg` version + 1.0, this value may also be an HTTP ``REQUEST_METHOD`` string, e.g. + ('GET', 'HEAD', 'PUT', 'POST', or 'DELETE'). Passing request method + strings as a ``request_type`` is deprecated. Use the + ``request_method`` attribute instead for maximum forward + compatibility. + request_method This value can either be one of the strings 'GET', 'POST', 'PUT', @@ -476,34 +504,6 @@ containment .. note:: This feature is new as of :mod:`repoze.bfg` 1.1. -route_name - - *This attribute services an advanced feature that isn't often used - unless you want to perform traversal *after* a route has matched.* - This value must match the ``name`` of a ```` declaration (see - :ref:`urldispatch_chapter`) that must match before this view will be - called. The ```` declaration specified by ``route_name`` must - exist in ZCML before the view that names the route - (XML-ordering-wise) . Note that the ```` declaration - referred to by ``route_name`` usually has a ``*traverse`` token in - the value of its ``path`` attribute, representing a part of the path - that will be used by traversal against the result of the route's - :term:`root factory`. See :ref:`hybrid_chapter` for more - information on using this advanced feature. - -request_type - - This value should be a Python dotted-path string representing the - :term:`interface` that the :term:`request` must have in order for - this view to be found and called. See - :ref:`view_request_types_section` for more information about request - types. For backwards compatibility with :mod:`repoze.bfg` version - 1.0, this value may also be an HTTP ``REQUEST_METHOD`` string, e.g. - ('GET', 'HEAD', 'PUT', 'POST', or 'DELETE'). Passing request method - strings as a ``request_type`` is deprecated. Use the - ``request_method`` attribute instead for maximum forward - compatibility. - xhr Thie value should be either ``True`` or ``False``. If this value is -- cgit v1.2.3