From d71acabebb804ebbd37703e78ac9886fcdded827 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sun, 8 Sep 2013 15:15:58 -0600 Subject: Update documentation to reflect the dotted python name --- docs/narr/hooks.rst | 8 +++++--- pyramid/config/adapters.py | 3 ++- pyramid/config/routes.py | 3 ++- pyramid/config/views.py | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 8ffda1a5f..a7dc3e78b 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -1384,9 +1384,11 @@ The first argument to :meth:`pyramid.config.Configurator.add_view_predicate`, the name, is a string representing the name that is expected to be passed to ``view_config`` (or its imperative analogue ``add_view``). -The second argument is a view or route predicate factory. A view or route -predicate factory is most often a class with a constructor (``__init__``), a -``text`` method, a ``phash`` method and a ``__call__`` method. For example: +The second argument is a view or route predicate factory, or a :term:`dotted +Python name` which refers to a view or route predicate factory. A view or +route predicate factory is most often a class with a constructor +(``__init__``), a ``text`` method, a ``phash`` method and a ``__call__`` +method. For example: .. code-block:: python :linenos: diff --git a/pyramid/config/adapters.py b/pyramid/config/adapters.py index 5573b6748..0a74e76b4 100644 --- a/pyramid/config/adapters.py +++ b/pyramid/config/adapters.py @@ -147,7 +147,8 @@ class AdaptersConfiguratorMixin(object): Python identifier (it will be used as a ``**predicates`` keyword argument to :meth:`~pyramid.config.Configurator.add_subscriber`). - ``factory`` should be a :term:`predicate factory`. + ``factory`` should be a :term:`predicate factory` or :term:`dotted + Python name` which refers to a predicate factory. See :ref:`subscriber_predicates` for more information. diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index 0ed370c94..c7659ce08 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -523,7 +523,8 @@ class RoutesConfiguratorMixin(object): Python identifier (it will be used as a keyword argument to ``add_view``). - ``factory`` should be a :term:`predicate factory`. + ``factory`` should be a :term:`predicate factory` or :term:`dotted + Python name` which refers to a predicate factory. See :ref:`view_and_route_predicates` for more information. diff --git a/pyramid/config/views.py b/pyramid/config/views.py index 707c84043..209b9e4a2 100644 --- a/pyramid/config/views.py +++ b/pyramid/config/views.py @@ -1369,7 +1369,8 @@ class ViewsConfiguratorMixin(object): Python identifier (it will be used as a keyword argument to ``add_view`` by others). - ``factory`` should be a :term:`predicate factory`. + ``factory`` should be a :term:`predicate factory` or :term:`dotted + Python name` which refers to a predicate factory. See :ref:`view_and_route_predicates` for more information. """ -- cgit v1.2.3