diff options
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
| -rw-r--r-- | docs/tutorials/wiki2/basiclayout.rst | 19 |
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: |
