diff options
| author | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2013-02-23 18:26:32 +0200 |
|---|---|---|
| committer | Tshepang Lekhonkhobe <tshepang@gmail.com> | 2013-03-05 09:29:11 +0200 |
| commit | bdbf854c95406c06c5b5e1bf85a89e5c961424f0 (patch) | |
| tree | 2d864846ed8663062c353f2bf75fc850be6fdd23 /docs | |
| parent | feee096963f9c64681210d1fd11de337a5c9afbc (diff) | |
| download | pyramid-bdbf854c95406c06c5b5e1bf85a89e5c961424f0.tar.gz pyramid-bdbf854c95406c06c5b5e1bf85a89e5c961424f0.tar.bz2 pyramid-bdbf854c95406c06c5b5e1bf85a89e5c961424f0.zip | |
we want 4-space indents
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/views.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst index afc2787ca..077d27366 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -542,7 +542,7 @@ The following types work as view callables in this style: from pyramid.response import Response def view(context, request): - return Response('OK') + return Response('OK') #. Classes that have an ``__init__`` method that accepts ``context, request`` and a ``__call__`` method which accepts no arguments, e.g.: @@ -553,12 +553,12 @@ The following types work as view callables in this style: from pyramid.response import Response class view(object): - def __init__(self, context, request): - self.context = context - self.request = request + def __init__(self, context, request): + self.context = context + self.request = request - def __call__(self): - return Response('OK') + def __call__(self): + return Response('OK') #. Arbitrary callables that have a ``__call__`` method that accepts ``context, request``, e.g.: @@ -569,8 +569,8 @@ The following types work as view callables in this style: from pyramid.response import Response class View(object): - def __call__(self, context, request): - return Response('OK') + def __call__(self, context, request): + return Response('OK') view = View() # this is the view callable This style of calling convention is most useful for :term:`traversal` based |
