From 8a5966918e377b1dfa35331da66d9cff2c33d7e4 Mon Sep 17 00:00:00 2001 From: John Jimenez Date: Fri, 27 Jan 2017 20:42:33 -0800 Subject: Minor change minor change to flow better (cherry picked from commit 0c705c9) --- docs/narr/views.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/views.rst') diff --git a/docs/narr/views.rst b/docs/narr/views.rst index ab139ea19..d4826be4d 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -52,7 +52,7 @@ of exceptions from within the body of a view callable. Defining a View Callable as a Function -------------------------------------- -One of the easiest way to define a view callable is to create a function that +One of the easiest ways to define a view callable is to create a function that accepts a single argument named ``request``, and which returns a :term:`Response` object. For example, this is a "hello world" view callable implemented as a function: -- cgit v1.2.3 From 659ea6dc622666376f345f03c1c444463ba01835 Mon Sep 17 00:00:00 2001 From: John Jimenez Date: Sat, 28 Jan 2017 07:35:44 -0800 Subject: Minor change distinguish between Pyramid itself and view code raising the exception as in previous exception listing. (cherry picked from commit eb166fb) --- docs/narr/views.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/views.rst') diff --git a/docs/narr/views.rst b/docs/narr/views.rst index d4826be4d..1a840fb5c 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -246,7 +246,7 @@ within view code, the result of the :term:`Not Found View` will be returned to the user agent which performed the request. If :exc:`~pyramid.httpexceptions.HTTPForbidden` is raised by Pyramid itself -within view code, the result of the :term:`Forbidden View` will be returned to +or within view code, the result of the :term:`Forbidden View` will be returned to the user agent which performed the request. .. index:: -- cgit v1.2.3 From 3ef8d92dbbd8b97ec66d5652b9a66a3652904722 Mon Sep 17 00:00:00 2001 From: John Jimenez Date: Sat, 28 Jan 2017 08:51:43 -0800 Subject: Minor change "functions, classes or any callable that accept" was messing with the flow while reading. Proposed change flows a little better for me. (cherry picked from commit 87d8aba) --- docs/narr/views.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs/narr/views.rst') diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 1a840fb5c..e8a07202e 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -523,8 +523,7 @@ Alternate View Callable Argument/Calling Conventions ---------------------------------------------------- Usually view callables are defined to accept only a single argument: -``request``. However, view callables may alternately be defined as classes, -functions, or any callable that accept *two* positional arguments: a +``request``. However, a view callable may alternately be defined as any class, function, or callable that accepts *two* positional arguments: a :term:`context` resource as the first argument and a :term:`request` as the second argument. -- cgit v1.2.3