diff options
| author | tosh <toshism@gmail.com> | 2017-06-26 19:35:38 -0500 |
|---|---|---|
| committer | tosh <toshism@gmail.com> | 2017-06-26 19:35:38 -0500 |
| commit | ea49281948ebe97a43a88e85ee0cd4260e6d3a58 (patch) | |
| tree | bedb9ce3298de64acacbf932543b47a54cb08bcf | |
| parent | 4be1e6ccd46adc6c9515d68bee12965cfc7e285e (diff) | |
| download | pyramid-ea49281948ebe97a43a88e85ee0cd4260e6d3a58.tar.gz pyramid-ea49281948ebe97a43a88e85ee0cd4260e6d3a58.tar.bz2 pyramid-ea49281948ebe97a43a88e85ee0cd4260e6d3a58.zip | |
documentation for view_config category argument
| -rw-r--r-- | pyramid/view.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/pyramid/view.py b/pyramid/view.py index a3f193011..8dbad75e2 100644 --- a/pyramid/view.py +++ b/pyramid/view.py @@ -185,14 +185,21 @@ class view_config(object): :meth:`pyramid.config.Configurator.add_view`. If any argument is left out, its default will be the equivalent ``add_view`` default. - An additional keyword argument named ``_depth`` is provided for people who - wish to reuse this class from another decorator. The default value is - ``0`` and should be specified relative to the ``view_config`` invocation. - It will be passed in to the :term:`venusian` ``attach`` function as the - depth of the callstack when Venusian checks if the decorator is being used - in a class or module context. It's not often used, but it can be useful - in this circumstance. See the ``attach`` function in Venusian for more - information. + Two additional keyword arguments which will be passed to the + :term:`venusian` ``attach`` function are ``_depth`` and ``category``. + + ``_depth`` is provided for people who wish to reuse this class from another + decorator. The default value is ``0`` and should be specified relative to + the ``view_config`` invocation. It will be passed in to the + :term:`venusian` ``attach`` function as the depth of the callstack when + Venusian checks if the decorator is being used in a class or module + context. It's not often used, but it can be useful in this circumstance. + + ``category`` sets the decorator category name. It can be useful in + combination with the ``category`` argument to ``scan`` to control which + views should be processed. + + See the ``attach`` function in Venusian for more information. .. seealso:: |
