diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-06-26 04:09:29 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-06-26 04:09:29 +0000 |
| commit | a8447a6250dc5f0a2e473e7d3fd2ef20c072c175 (patch) | |
| tree | c66ebd282faaeff9a92d745cecf23f72313959fc | |
| parent | 9f3eb65cf64cca0949caf04044b62ba90dff548f (diff) | |
| download | pyramid-a8447a6250dc5f0a2e473e7d3fd2ef20c072c175.tar.gz pyramid-a8447a6250dc5f0a2e473e7d3fd2ef20c072c175.tar.bz2 pyramid-a8447a6250dc5f0a2e473e7d3fd2ef20c072c175.zip | |
More docs.
| -rw-r--r-- | repoze/bfg/url.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/repoze/bfg/url.py b/repoze/bfg/url.py index 12b86c786..066feae22 100644 --- a/repoze/bfg/url.py +++ b/repoze/bfg/url.py @@ -29,7 +29,21 @@ def route_url(route_name, request, *elements, **kw): route_url('foobar', request, foo='1') => <KeyError exception> route_url('foobar', request, foo='1', bar='2') => <KeyError exception> route_url('foobar', request, foo='1', bar='2', - 'traverse='a/b') => http://e.com/1/2/a/b + 'traverse=('a','b') => http://e.com/1/2/a/b + route_url('foobar', request, foo='1', bar='2', + 'traverse=('/a/b') => http://e.com/1/2/a/b + + Values replacing ``:segment`` arguments can be passed as strings + or Unicode objects. They will be encoded to UTF-8 and URL-quoted + before being placed into the generated URL. + + Values replacing ``*remainder`` arguments can be passed as strings + *or* tuples of Unicode/string values. If a tuple is passed as a + ``*remainder`` replacement value, its values are URL-quoted and + encoded to UTF-8. The resulting strings are joined with slashes + and rendered into the URL. If a string is passed as a + ``*remainder`` replacement value, it is tacked on to the URL + untouched. If a keyword argument ``_query`` is present, it will used to compose a query string that will be tacked on to the end of the |
