diff options
| author | Chris McDonough <chrism@plope.com> | 2011-01-07 22:53:05 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-01-07 22:53:05 -0500 |
| commit | 0b0e74764fa0f2a3d6daa8f8ce70112419ea6981 (patch) | |
| tree | 693b0bc712bf23916afdc571879ec24de82a13f7 /docs/narr | |
| parent | 512d53fffab8f0d258f528d0c24c313b65bde652 (diff) | |
| download | pyramid-0b0e74764fa0f2a3d6daa8f8ce70112419ea6981.tar.gz pyramid-0b0e74764fa0f2a3d6daa8f8ce70112419ea6981.tar.bz2 pyramid-0b0e74764fa0f2a3d6daa8f8ce70112419ea6981.zip | |
- Allow ``decorator`` and ``mapper`` arguments to view ZCML directive.
- Document ``decorator`` and ``mapper`` arguments in various places.
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/views.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 81f3e644f..813c54bee 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -658,6 +658,22 @@ Non-Predicate Arguments If ``wrapper`` is not supplied, no wrapper view is used. +``decorator`` + A :term:`dotted Python name` to function (or the function itself) which + will be used to decorate the registered :term:`view callable`. The + decorator function will be called with the view callable as a single + argument. The view callable it is passed will accept ``(context, + request)``. The decorator must return a replacement view callable which + also accepts ``(context, request)``. + +``mapper`` + A Python object or :term:`dotted Python name` which refers to a :term:`view + mapper`, or ``None``. By default it is ``None``, which indicates that the + view should use the default view mapper. This plug-point is useful for + Pyramid extension developers, but it's not very useful for 'civilians' who + are just developing stock Pyramid applications. Pay no attention to the man + behind the curtain. + Predicate Arguments +++++++++++++++++++ |
