summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/basiclayout.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-04-22 13:42:19 -0400
committerChris McDonough <chrism@plope.com>2011-04-22 13:42:19 -0400
commited7ffe0e2065100f551793b3774656d8bdde0fb0 (patch)
tree53637b76d148774c5a7c3b9e103373e33e6c2f9e /docs/tutorials/wiki2/basiclayout.rst
parentc150d77248653172b487326a1059b8c0bc5056e4 (diff)
downloadpyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.tar.gz
pyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.tar.bz2
pyramid-ed7ffe0e2065100f551793b3774656d8bdde0fb0.zip
- Make sure deprecation warnings aren't raised when tests are run.
- Modify documentation for cross-referencing. - Use add_view(viewname) syntax rather than add_view(view=viewname) syntax for normalization. - Use warnings.warn rather than zope.deprecated in order to make testing easier. - Move tests which test deprecated methods of configurator to a separate test case.
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst19
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index bb39a686d..82e112c64 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -85,9 +85,9 @@ used when the URL is ``/``:
:language: py
Since this route has a ``pattern`` equalling ``/`` it is the route that will
-be called when the URL ``/`` is visted, e.g. ``http://localhost:6543/``.
+be matched when the URL ``/`` is visted, e.g. ``http://localhost:6543/``.
-Mapping the ``home`` route to code is done by registering a ``view``. You will
+Mapping the ``home`` route to code is done by registering a view. You will
use :meth:`pyramid.config.Configurator.add_view` in :term:`URL dispatch` to
register views for the routes, mapping your patterns to code:
@@ -95,13 +95,14 @@ register views for the routes, mapping your patterns to code:
:lines: 14
:language: py
-The ``view`` argument of ``tutorial.views.my_view`` is the dotted name to a
-*function* we write (generated by the ``pyramid_routesalchemy`` scaffold) that
-is given a ``request`` object and which returns a response or a dictionary.
-This view also names a ``renderer``, which is a template which lives in the
-``templates`` subdirectory of the package. When the ``tutorial.views.my_view``
-view returns a dictionary, a :term:`renderer` will use this template to create
-a response.
+The first positional ``add_view`` argument ``tutorial.views.my_view`` is the
+dotted name to a *function* we write (generated by the
+``pyramid_routesalchemy`` scaffold) that is given a ``request`` object and
+which returns a response or a dictionary. This view also names a
+``renderer``, which is a template which lives in the ``templates``
+subdirectory of the package. When the ``tutorial.views.my_view`` view
+returns a dictionary, a :term:`renderer` will use this template to create a
+response. This
Finally, we use the :meth:`pyramid.config.Configurator.make_wsgi_app`
method to return a :term:`WSGI` application: