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 --- repoze/bfg/view.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'repoze/bfg/view.py') diff --git a/repoze/bfg/view.py b/repoze/bfg/view.py index 0273c1e72..2a154df87 100644 --- a/repoze/bfg/view.py +++ b/repoze/bfg/view.py @@ -200,9 +200,11 @@ class bfg_view(object): ``request_param``, ``containment``, ``xhr``, ``accept``, ``header`` and ``path_info``. - If ``context`` is not supplied, the interface - ``zope.interface.Interface`` (matching any context) is used. An alias - for ``context`` is ``for_``. + ``context`` should be a Python object or :term:`dotted Python + name` representing the context type that must be found for this + view to be called. If ``context`` is not supplied, the interface + ``zope.interface.Interface`` (matching any context) is used. An + alias for ``context`` is ``for_``. If ``permission`` is not supplied, no permission is registered for this view (it's accessible by any caller). @@ -248,12 +250,15 @@ class bfg_view(object): right hand side of the expression (``123``) for the view to "match" the current request. - If ``containment`` is not supplied, this view will be called when - the context of the request has any (or no) :term:`lineage`. If - ``containment`` *is* supplied, it must be a class or - :term:`interface`, denoting that the view 'matches' the current - request only if any graph :term:`lineage` node possesses this - class or interface. + ``containment`` should be a Python object or :term:`dotted Python + name` representing a class or interface type which must be found + as one of the context's location parents for this view to be + called. If ``containment`` is not supplied, this view will be + called when the context of the request has any (or no) + :term:`lineage`. If ``containment`` *is* supplied, it must be a + class or :term:`interface`, denoting that the view'matches' the + current request only if any graph :term:`lineage` node possesses + this class or interface. If ``xhr`` is specified, it must be a boolean value. If the value is ``True``, the view will only be invoked if the request's -- cgit v1.2.3