diff options
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/views.rst | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
