summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki/definingviews.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-12-15 19:08:23 -0500
committerChris McDonough <chrism@plope.com>2010-12-15 19:08:23 -0500
commit55e60cf78d6af4fcf99e546f779c31a18ea0bfac (patch)
tree0cbfca4d41682f08569ece40959b2bbdc646e522 /docs/tutorials/wiki/definingviews.rst
parent86a304c7742862e9bf0185c92f5d11ee33ce01c7 (diff)
downloadpyramid-55e60cf78d6af4fcf99e546f779c31a18ea0bfac.tar.gz
pyramid-55e60cf78d6af4fcf99e546f779c31a18ea0bfac.tar.bz2
pyramid-55e60cf78d6af4fcf99e546f779c31a18ea0bfac.zip
- If you followed it to-the-letter, the ZODB+Traversal Wiki tutorial would
instruct you to run a test which would fail because the view callable generated by the ``pyramid_zodb`` tutorial used a one-arg view callable, but the test in the sample code used a two-arg call. - Updated ZODB+Traversal tutorial setup.py of all steps to match what's generated by ``pyramid_zodb``.
Diffstat (limited to 'docs/tutorials/wiki/definingviews.rst')
-rw-r--r--docs/tutorials/wiki/definingviews.rst26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/tutorials/wiki/definingviews.rst b/docs/tutorials/wiki/definingviews.rst
index bbda3d45c..97314fb77 100644
--- a/docs/tutorials/wiki/definingviews.rst
+++ b/docs/tutorials/wiki/definingviews.rst
@@ -7,19 +7,19 @@ application is typically a simple Python function that accepts two
parameters: :term:`context`, and :term:`request`. A view callable is
assumed to return a :term:`response` object.
-.. note:: A :app:`Pyramid` view can also be defined as callable
- which accepts *one* arguments: a :term:`request`. You'll see this
- one-argument pattern used in other :app:`Pyramid` tutorials and
- applications. Either calling convention will work in any
- :app:`Pyramid` application; the calling conventions can be used
- interchangeably as necessary. In :term:`traversal` based
- applications, such as this tutorial, the context is used frequently
- within the body of a view method, so it makes sense to use the
- two-argument syntax in this application. However, in :term:`url
- dispatch` based applications, the context object is rarely used in
- the view body itself, so within code that uses URL-dispatch-only,
- it's common to define views as callables that accept only a request
- to avoid the visual "noise".
+.. note:: A :app:`Pyramid` view can also be defined as callable which accepts
+ *one* arguments: a :term:`request`. You'll see this one-argument pattern
+ used in other :app:`Pyramid` tutorials and applications. It was also used
+ in the ``my_view`` view callable that we deleted in the last chapter.
+ Either calling convention will work in any :app:`Pyramid` application; the
+ calling conventions can be used interchangeably as necessary. In
+ :term:`traversal` based applications, such as this tutorial, the context
+ is used frequently within the body of a view method, so it makes sense to
+ use the two-argument syntax in this application. However, in :term:`url
+ dispatch` based applications, the context object is rarely used in the
+ view body itself, so within code that uses URL-dispatch-only, it's common
+ to define views as callables that accept only a request to avoid the
+ visual "noise".
We're going to define several :term:`view callable` functions then
wire them into :app:`Pyramid` using some :term:`view