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/firstapp.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'docs/narr/firstapp.rst') diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst index 01ad88704..deac69fda 100644 --- a/docs/narr/firstapp.rst +++ b/docs/narr/firstapp.rst @@ -235,14 +235,15 @@ arguments is known as a view configuration :term:`predicate`. The line ``config.add_view(hello_world)`` registers the ``hello_world`` function as a view callable. The ``add_view`` method -of a Configurator must be called with a view callable object as its -first argument, so the first argument passed is the ``hello_world`` -function. This line calls ``add_view`` with a *default* value for the -:term:`predicate` argument, named ``name``. The ``name`` predicate -defaults to a value equalling the empty string (``''``). This means -that we're instructing :mod:`repoze.bfg` to invoke the ``hello_world`` -view callable when the :term:`view name` is the empty string. We'll -learn in later chapters what a :term:`view name` is, and under which +of a Configurator must be called with a view callable object or a +:term:`dotted Python name` as its first argument, so the first +argument passed is the ``hello_world`` function. This line calls +``add_view`` with a *default* value for the :term:`predicate` +argument, named ``name``. The ``name`` predicate defaults to a value +equalling the empty string (``''``). This means that we're +instructing :mod:`repoze.bfg` to invoke the ``hello_world`` view +callable when the :term:`view name` is the empty string. We'll learn +in later chapters what a :term:`view name` is, and under which circumstances a request will have a view name that is the empty string; in this particular application, it means that the ``hello_world`` view callable will be invoked when the root URL ``/`` -- cgit v1.2.3