From 5999a8c3ae406902987989cf7c48d3c08b6638cf Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Thu, 1 Dec 2011 22:26:50 -0800 Subject: Attempt to correct grammar in this paragraph. Uncertain whether it is both technically and grammatically correct now. Please verify. --- docs/narr/firstapp.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst index ccc2b8b18..2c8e346b1 100644 --- a/docs/narr/firstapp.rst +++ b/docs/narr/firstapp.rst @@ -71,11 +71,11 @@ named ``hello_world``. :linenos: :pyobject: hello_world -This function doesn't do anything very difficult. The functions accepts a +This function doesn't do anything very difficult. The function accepts a single argument (``request``). The ``hello_world`` function returns an -instance of the :class:`pyramid.response.Response`. The single argument to -the class' constructor is value computed from arguments matched from the url -route. This value becomes the body of the response. +instance of the :class:`pyramid.response.Response` class. The single +argument to the class' constructor value is computed from arguments +matched from the url route. This value becomes the body of the response. This function is known as a :term:`view callable`. A view callable accepts a single argument, ``request``. It is expected to return a -- cgit v1.2.3 From f0a1b9b491bab0ac90be6765ddf56a0696d4f863 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 2 Dec 2011 09:44:21 -0600 Subject: Attempted to clean this up further. --- docs/narr/firstapp.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst index 2c8e346b1..c082f616b 100644 --- a/docs/narr/firstapp.rst +++ b/docs/narr/firstapp.rst @@ -71,11 +71,10 @@ named ``hello_world``. :linenos: :pyobject: hello_world -This function doesn't do anything very difficult. The function accepts a -single argument (``request``). The ``hello_world`` function returns an +The function accepts a single argument (``request``) and it returns an instance of the :class:`pyramid.response.Response` class. The single -argument to the class' constructor value is computed from arguments -matched from the url route. This value becomes the body of the response. +argument to the class' constructor is a string computed from parameters +matched from the URL. This value becomes the body of the response. This function is known as a :term:`view callable`. A view callable accepts a single argument, ``request``. It is expected to return a @@ -157,7 +156,7 @@ Adding Configuration :lines: 10-11 First line above calls the :meth:`pyramid.config.Configurator.add_route` -method, which registers a :term:`route` to match any url path that begins +method, which registers a :term:`route` to match any URL path that begins with ``/hello/`` followed by a string. The second line, ``config.add_view(hello_world, route_name='hello')``, -- cgit v1.2.3