diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-09-05 22:39:20 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-09-05 22:39:20 +0000 |
| commit | d89aee7640b1e01a7dda4e603e87461074fbbdd7 (patch) | |
| tree | 16857b0c6fe0b0932903d13c10382732a7bf3b5f /repoze/bfg/view.py | |
| parent | 91255626afd43d558cbc4eb74865ccdf0b629417 (diff) | |
| download | pyramid-d89aee7640b1e01a7dda4e603e87461074fbbdd7.tar.gz pyramid-d89aee7640b1e01a7dda4e603e87461074fbbdd7.tar.bz2 pyramid-d89aee7640b1e01a7dda4e603e87461074fbbdd7.zip | |
- 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
Diffstat (limited to 'repoze/bfg/view.py')
| -rw-r--r-- | repoze/bfg/view.py | 23 |
1 files changed, 14 insertions, 9 deletions
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 |
