summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/errata.rst35
-rw-r--r--docs/narr/views.rst6
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