summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrforkel <robert.forkel@gulp.de>2012-06-26 10:07:59 +0200
committerMichael Merickel <michael@merickel.org>2012-11-04 18:59:18 -0600
commit9aac76aad6d8e40278f0aab16322bd1dbe6803bc (patch)
tree67d6ec1bb31b9d167a079c8d1a182941ee6a9e8d
parent76c9c20478f53c36d5ded59191e335dba1d47da6 (diff)
downloadpyramid-9aac76aad6d8e40278f0aab16322bd1dbe6803bc.tar.gz
pyramid-9aac76aad6d8e40278f0aab16322bd1dbe6803bc.tar.bz2
pyramid-9aac76aad6d8e40278f0aab16322bd1dbe6803bc.zip
Added explanations to docstring.
-rw-r--r--pyramid/config/views.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/pyramid/config/views.py b/pyramid/config/views.py
index b17619356..02d5b52bf 100644
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -846,6 +846,27 @@ class ViewsConfiguratorMixin(object):
replacement view callable which also accepts ``(context,
request)``.
+ If decorator is a tuple or list of callables, the callables will be
+ combined and used in the order provided as a decorator.
+ For example::
+
+ @view_config(..., decorator=[decorator1, decorator2])
+ def myview(request):
+ ....
+
+ Is similar to doing::
+
+ @view_config(...)
+ @decorator2
+ @decorator1
+ def myview(request):
+ ...
+
+ Except with the existing benefits of ``decorator=`` (having a common
+ decorator syntax for all view calling conventions and not having to
+ think about preserving function attributes such as ``__name__`` and
+ ``__module__`` within decorator logic).
+
mapper
A Python object or :term:`dotted Python name` which refers to a