diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-02-02 03:18:21 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-02-02 03:18:21 +0000 |
| commit | 362061b24ce3f5d187a4a3a14f566c1653bccfb9 (patch) | |
| tree | ec98c0be57e836b050f7b9a42a7e9377d7a2225f /repoze/bfg/configuration.py | |
| parent | bd363b8e0028f13819d833f02358f617e09a5d8a (diff) | |
| download | pyramid-362061b24ce3f5d187a4a3a14f566c1653bccfb9.tar.gz pyramid-362061b24ce3f5d187a4a3a14f566c1653bccfb9.tar.bz2 pyramid-362061b24ce3f5d187a4a3a14f566c1653bccfb9.zip | |
- Remove ``view_header``, ``view_accept``, ``view_xhr``,
``view_path_info``, ``view_request_method``, ``view_request_param``,
and ``view_containment`` predicate arguments from the
``Configurator.add_route`` argument list. These arguments were
speculative. If you need the features exposed by these arguments,
add a view associated with a route using the ``route_name`` argument
to the ``add_view`` method instead.
- Remove ``view_header``, ``view_accept``, ``view_xhr``,
``view_path_info``, ``view_request_method``, ``view_request_param``,
and ``view_containment`` predicate arguments from the ``route`` ZCML
directive attribute set. These attributes were speculative. If you
need the features exposed by these attributes, add a view associated
with a route using the ``route_name`` attribute of the ``view`` ZCML
directive instead.
Diffstat (limited to 'repoze/bfg/configuration.py')
| -rw-r--r-- | repoze/bfg/configuration.py | 62 |
1 files changed, 19 insertions, 43 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 2fff1054c..8a254bdec 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -800,17 +800,26 @@ class Configurator(object): self.registry.registerAdapter(multiview, (request_iface, context), IMultiView, name, info=_info) - def add_route(self, name, path, view=None, view_for=None, - permission=None, factory=None, for_=None, - header=None, xhr=False, accept=None, path_info=None, - request_method=None, request_param=None, + def add_route(self, + name, + path, + view=None, + view_for=None, + permission=None, + factory=None, + for_=None, + header=None, + xhr=False, + accept=None, + path_info=None, + request_method=None, + request_param=None, custom_predicates=(), - view_permission=None, view_request_method=None, - view_request_param=None, - view_containment=None, view_attr=None, - renderer=None, view_renderer=None, view_header=None, - view_accept=None, view_xhr=False, - view_path_info=None, view_context=None, + view_permission=None, + renderer=None, + view_renderer=None, + view_context=None, + view_attr=None, use_global_views=False, _info=u''): """ Add a :term:`route configuration` to the current @@ -992,31 +1001,6 @@ class Configurator(object): This argument can also be spelled as ``renderer``. - view_request_type - - A reference to an :term:`interface` representing a - :term:`request type`. If this argument is not specified, - any request type will be considered a match for the view - associated with this route. - - If the ``view`` argument is not provided, this argument has - no effect. - - This argument can also be spelled as ``request_type``. - - view_containment - - This value should be a reference to a Python class or - :term:`interface` that a parent object in the - :term:`lineage` must provide in order for the view related - to this route to be found and called. Your models must be - 'location-aware' to use this feature. See - :ref:`location_aware` for more information about - location-awareness. - - If the ``view`` argument is not provided, this argument has no - effect. - view_attr The view machinery defaults to using the ``__call__`` method @@ -1079,15 +1063,7 @@ class Configurator(object): view=view, name='', route_name=name, - request_method=view_request_method, - request_param=view_request_param, - containment=view_containment, - attr=view_attr, renderer=view_renderer, - header=view_header, - accept=view_accept, - xhr=view_xhr, - path_info=view_path_info, _info=_info, ) |
