From d89aee7640b1e01a7dda4e603e87461074fbbdd7 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 5 Sep 2010 22:39:20 +0000 Subject: - Each of the follow methods of the Configurator now allow the below-named arguments to be passed as "dotted name strings" (e.g. "foo.bar.baz") rather than as actual implementation objects that must be imported: setup_registry root_factory, authentication_policy, authorization_policy, debug_logger, locale_negotiator, request_factory, renderer_globals_factory add_subscriber subscriber, iface derive_view view add_view view, for_, context, request_type, containment add_route() view, view_for, factory, for_, view_context scan package add_renderer factory set_forbidden_view view set_notfound_view view set_request_factory factory set_renderer_globals_factory() factory set_locale_negotiator negotiator testing_add_subscriber event_iface --- docs/narr/hooks.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/narr/hooks.rst') diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 70e3f3759..b774c2012 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -351,7 +351,8 @@ request object. The class (aka "factory") that :mod:`repoze.bfg` uses to create a request object instance can be changed by passing a ``request_factory`` argument to the constructor of the -:term:`configurator`. +:term:`configurator`. This argument can be either a callable or a +:term:`Python dotted name` representing a callable. .. code-block:: python :linenos: @@ -392,7 +393,7 @@ method: pass config = Configurator() - config.set_request_factory(MyRequestFactory) + config.set_request_factory(MyRequest) .. _adding_renderer_globals: @@ -411,7 +412,9 @@ renderer. A callback that :mod:`repoze.bfg` will call every time a renderer is invoked can be added by passing a ``renderer_globals_factory`` -argument to the constructor of the :term:`configurator`. +argument to the constructor of the :term:`configurator`. This +callback can either be a callable object or a :term:`Python dotted +name` representing such a callable. .. code-block:: python :linenos: -- cgit v1.2.3