summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTshepang Lekhonkhobe <tshepang@gmail.com>2013-03-08 01:08:21 +0200
committerTshepang Lekhonkhobe <tshepang@gmail.com>2013-03-08 01:08:21 +0200
commit136a1ec15e9f9558b87a35ec0274b56793119019 (patch)
tree0bbc46f4f423e5e56dce57ea118f713bc679e0a1 /docs
parent527e4eff00ecbe8e3d888fd62fe85b6bd810d358 (diff)
downloadpyramid-136a1ec15e9f9558b87a35ec0274b56793119019.tar.gz
pyramid-136a1ec15e9f9558b87a35ec0274b56793119019.tar.bz2
pyramid-136a1ec15e9f9558b87a35ec0274b56793119019.zip
2.5 no longer supported
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/viewconfig.rst22
1 files changed, 1 insertions, 21 deletions
diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst
index e7c79b09b..9f3b91c26 100644
--- a/docs/narr/viewconfig.rst
+++ b/docs/narr/viewconfig.rst
@@ -583,8 +583,7 @@ If your view callable is a function, it may be used as a function decorator:
return Response('edited!')
If your view callable is a class, the decorator can also be used as a class
-decorator in Python 2.6 and better (Python 2.5 and below do not support class
-decorators). All the arguments to the decorator are the same when applied
+decorator. All the arguments to the decorator are the same when applied
against a class as when they are applied against a function. For example:
.. code-block:: python
@@ -601,25 +600,6 @@ against a class as when they are applied against a function. For example:
def __call__(self):
return Response('hello')
-You can use the :class:`~pyramid.view.view_config` decorator as a simple
-callable to manually decorate classes in Python 2.5 and below without the
-decorator syntactic sugar, if you wish:
-
-.. code-block:: python
- :linenos:
-
- from pyramid.response import Response
- from pyramid.view import view_config
-
- class MyView(object):
- def __init__(self, request):
- self.request = request
-
- def __call__(self):
- return Response('hello')
-
- my_view = view_config(route_name='hello')(MyView)
-
More than one :class:`~pyramid.view.view_config` decorator can be stacked on
top of any number of others. Each decorator creates a separate view
registration. For example: