summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2013-03-12 22:40:08 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2013-03-12 22:40:08 +0200
commit2dfdecd4c7a8255702aa08f2807b4a3341b270f7 (patch)
tree00fa754af92e6f7ca4ddaf760f9407c6330f1c50 /docs/narr
parent18d0a34fbd804be11046efe7f10b7212f018091b (diff)
downloadpyramid-2dfdecd4c7a8255702aa08f2807b4a3341b270f7.tar.gz
pyramid-2dfdecd4c7a8255702aa08f2807b4a3341b270f7.tar.bz2
pyramid-2dfdecd4c7a8255702aa08f2807b4a3341b270f7.zip
fix whitespace issue... remove tabs
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/views.rst36
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index 077d27366..90f6825c0 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -537,41 +537,41 @@ The following types work as view callables in this style:
e.g.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- def view(context, request):
- return Response('OK')
+ def view(context, request):
+ return Response('OK')
#. Classes that have an ``__init__`` method that accepts ``context,
request`` and a ``__call__`` method which accepts no arguments, e.g.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- class view(object):
- def __init__(self, context, request):
- self.context = context
- self.request = request
+ class view(object):
+ 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.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- class View(object):
- def __call__(self, context, request):
- return Response('OK')
- view = View() # this is the view callable
+ class View(object):
+ 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
applications, where the context object is frequently used within the view