From a8447a6250dc5f0a2e473e7d3fd2ef20c072c175 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 26 Jun 2009 04:09:29 +0000 Subject: More docs. --- repoze/bfg/url.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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') => route_url('foobar', request, foo='1', bar='2') => 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 -- cgit v1.2.3