summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrforkel <robert.forkel@gulp.de>2012-06-26 10:07:59 +0200
committerrforkel <robert.forkel@gulp.de>2012-06-26 10:07:59 +0200
commit6b2c15e8187b072343cb162d731b5026cc0f940a (patch)
treee0cfedb45b9de19d93ab16e9f3979bec29c9ca0c
parent6454a73a9ea0b00f3881e003efda3048e8407a5f (diff)
downloadpyramid-6b2c15e8187b072343cb162d731b5026cc0f940a.tar.gz
pyramid-6b2c15e8187b072343cb162d731b5026cc0f940a.tar.bz2
pyramid-6b2c15e8187b072343cb162d731b5026cc0f940a.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 b00c4b9f2..e8169e958 100644
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -816,6 +816,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