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/narr | |
| parent | 8301bc99420ae3dd05ae4d33fdde8c83a16598f1 (diff) | |
| download | pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.tar.gz pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.tar.bz2 pyramid-dc46fa34275a4fc0de75472813f74c35a7f1b5dc.zip | |
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 |
