diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-07 16:44:43 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-07 16:44:43 -0500 |
| commit | 0476846873e55a5d5f43a7d0ee0a83a260788264 (patch) | |
| tree | f2eb384bac5d402138fcc8dcd726e6c28d29fd95 | |
| parent | 8ff65d19d0f998df1e05abfae9ff7613ec7ea816 (diff) | |
| parent | d85611781f67ec91535ecc9663808814f0b38519 (diff) | |
| download | pyramid-0476846873e55a5d5f43a7d0ee0a83a260788264.tar.gz pyramid-0476846873e55a5d5f43a7d0ee0a83a260788264.tar.bz2 pyramid-0476846873e55a5d5f43a7d0ee0a83a260788264.zip | |
Merge branch 'mgedmin-master'
| -rw-r--r-- | docs/tutorials/wiki2/definingviews.rst | 2 | ||||
| -rw-r--r-- | pyramid/url.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst index ea4ca3bab..0826de660 100644 --- a/docs/tutorials/wiki2/definingviews.rst +++ b/docs/tutorials/wiki2/definingviews.rst @@ -297,7 +297,7 @@ something like so: .. literalinclude:: src/views/tutorial/__init__.py :linenos: - :language: xml + :language: python The WSGI Pipeline ----------------- diff --git a/pyramid/url.py b/pyramid/url.py index 9d94a44f5..ce7eee8d5 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -17,12 +17,12 @@ from pyramid.traversal import quote_path_segment def route_url(route_name, request, *elements, **kw): """Generates a fully qualified URL for a named :mod:`pyramid` :term:`route configuration`. - + Use the route's ``name`` as the first positional argument. Use a request object as the second positional argument. Additional positional arguments are appended to the URL as path segments after it is generated. - + Use keyword arguments to supply values which match any dynamic path elements in the route definition. Raises a :exc:`KeyError` exception if the URL cannot be generated for any reason (not @@ -34,9 +34,9 @@ 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 + 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 |
