summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-08-13 20:27:24 +0000
committerChris McDonough <chrism@agendaless.com>2009-08-13 20:27:24 +0000
commitaf9006a8ecbff71df4fb7255873e3b7dcb737de8 (patch)
tree59ee68274521e7b0f7f5c022f5ce50d1414d157b /docs
parent6b9be19e4d3f2b60296e44d3f304a75298a2debd (diff)
downloadpyramid-af9006a8ecbff71df4fb7255873e3b7dcb737de8.tar.gz
pyramid-af9006a8ecbff71df4fb7255873e3b7dcb737de8.tar.bz2
pyramid-af9006a8ecbff71df4fb7255873e3b7dcb737de8.zip
- Request-only-convention examples in the "Views" narrative
documentation were broken.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/views.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index 6a7f0ac8b..b5db0ca63 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -91,27 +91,27 @@ following types work as views in this style:
from webob import Response
- def aview(request):
+ def view(request):
return Response('OK')
-#. New and old-style classes that have an ``__init__`` method that
- accepts ``self, request``, e.g.::
+#. New-style and old-style classes that have an ``__init__`` method
+ that accepts ``self, request``, e.g.::
from webob import Response
- def View(object):
+ class view(object):
__init__(self, request):
- return Response('OK')
+ return Response('OK')
#. Arbitrary callables that have a ``__call__`` method that accepts
``self, request``, e.g.::
from webob import Response
- def AView(object):
+ class View(object):
def __call__(self, request):
return Response('OK')
- view = AView()
+ view = View() # this is the view callable
This style of calling convention is useful for :term:`url dispatch`
based applications, where the context is seldom used within the view