diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-07-23 07:33:23 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-07-23 07:33:23 +0000 |
| commit | 8e18ea4a560b4456ace86bdef6060304de053238 (patch) | |
| tree | 9bb83ceecf501a769f81466ce80699b804a7b7bc /repoze | |
| parent | ad462fedcd5e625ef1ad36c2c2d26cf072b8f1a3 (diff) | |
| download | pyramid-8e18ea4a560b4456ace86bdef6060304de053238.tar.gz pyramid-8e18ea4a560b4456ace86bdef6060304de053238.tar.bz2 pyramid-8e18ea4a560b4456ace86bdef6060304de053238.zip | |
- The ``Hybrid`` narrative chapter now contains a description of the
``traverse`` route argument.
- Fix route ZCML directive to use traverse.
Diffstat (limited to 'repoze')
| -rw-r--r-- | repoze/bfg/zcml.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/repoze/bfg/zcml.py b/repoze/bfg/zcml.py index b8ca9eb21..b350d5ea7 100644 --- a/repoze/bfg/zcml.py +++ b/repoze/bfg/zcml.py @@ -174,6 +174,7 @@ def view( header=None, path_info=None, match_val=None, + traverse=None, custom_predicates=(), context=None, cacheable=True, # not used, here for b/w compat < 0.8 @@ -205,7 +206,7 @@ def view( request_method=request_method, request_param=request_param, containment=containment, attr=attr, renderer=renderer, wrapper=wrapper, xhr=xhr, accept=accept, header=header, - path_info=path_info, match_val=match_val, + path_info=path_info, match_val=match_val, custom_predicates=custom_predicates, _info=_context.info) @@ -252,6 +253,12 @@ class IRouteDirective(Interface): accept = TextLine(title=u'accept', required=False) xhr = Bool(title=u'xhr', required=False) path_info = TextLine(title=u'path_info', required=False) + + traverse = TextLine( + title=u'Traverse pattern"', + description=u'A pattern which will compose a traversal path', + required = False) + custom_predicates = Tokens( title=u"One or more custom dotted names to custom predicate callables", description=(u"A list of dotted name references to callables that " @@ -281,6 +288,7 @@ def route(_context, renderer=None, view_renderer=None, view_context=None, + traverse=None, use_global_views=False): """ Handle ``route`` ZCML directives """ @@ -318,6 +326,7 @@ def route(_context, view_renderer=view_renderer, view_attr=view_attr, use_global_views=use_global_views, + traverse=traverse, _info=_context.info ) |
