diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-01-21 05:35:15 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-01-21 05:35:15 +0000 |
| commit | dc46fa34275a4fc0de75472813f74c35a7f1b5dc (patch) | |
| tree | 31003f122b9162802ef63ce457bb454b2c17839a /docs | |
| parent | 8301bc99420ae3dd05ae4d33fdde8c83a16598f1 (diff) | |
| download | pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.tar.gz pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.tar.bz2 pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.zip | |
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/errata.rst | 35 | ||||
| -rw-r--r-- | docs/narr/views.rst | 6 |
2 files changed, 40 insertions, 1 deletions
diff --git a/docs/errata.rst b/docs/errata.rst index a77c393c1..eb33de8ba 100644 --- a/docs/errata.rst +++ b/docs/errata.rst @@ -29,3 +29,38 @@ Should read: "The chapter named Context Finding and View Lookup (pp. 57) describes how, using information from the request, a context and a view name are computed ." + +pp. 106 +------- + +The enumeration: + + 2. Classes that have an ``__init__`` method that accepts ``context, + request``, e.g.: + + .. code-block:: python + :linenos: + + from webob import Response + + class view(object): + def __init__(self, context, request): + return Response('OK') + +Should read: + + 2. Classes that have an ``__init__`` method that accepts ``context, + request``, and a ``__call__`` which accepts no arguments, e.g.: + + .. code-block:: python + :linenos: + + from webob import Response + + class view(object): + def __init__(self, context, request): + self.context = context + self.request = request + + def __call__(self): + return Response('OK') diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 7e6577df8..fc1842eaf 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -168,7 +168,7 @@ The following types work as view callables in this style: return Response('OK') #. Classes that have an ``__init__`` method that accepts ``context, - request``, e.g.: + request`` and a ``__call__`` which accepts no arguments, e.g.: .. code-block:: python :linenos: @@ -177,6 +177,10 @@ The following types work as view callables in this style: class view(object): def __init__(self, context, request): + self.context = context + self.request = request + + def __call__(self): return Response('OK') #. Arbitrary callables that have a ``__call__`` method that accepts |
