summaryrefslogtreecommitdiff
path: root/docs/narr/urldispatch.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-12-01 19:33:06 -0500
committerChris McDonough <chrism@plope.com>2010-12-01 19:33:06 -0500
commitf1ffaeeff438aa2ea768c508fe38e3dd108b9369 (patch)
tree6ff2b0d0063be11ef0b3fa65232a37f629331165 /docs/narr/urldispatch.rst
parentd195074f2c6ef704926cf56de4e26e36e11ee758 (diff)
parent1220f3b8f869e4caf298d9acb5e5fffe0a86129e (diff)
downloadpyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.tar.gz
pyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.tar.bz2
pyramid-f1ffaeeff438aa2ea768c508fe38e3dd108b9369.zip
Merge branch 'master' into twophase
Diffstat (limited to 'docs/narr/urldispatch.rst')
-rw-r--r--docs/narr/urldispatch.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index df7d592f9..e439c71cd 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -350,7 +350,9 @@ also capture the remainder of the URL, for example:
foo/{baz}/{bar}{fizzle:.*}
The above pattern will match these URLs, generating the following
-matchdicts::
+matchdicts:
+
+.. code-block:: text
foo/1/2/ -> {'baz':'1', 'bar':'2', 'fizzle':()}
foo/abc/def/a/b/c -> {'baz':'abc', 'bar':'def', 'fizzle': 'a/b/c')}
@@ -836,8 +838,8 @@ strings. The values will be Unicode objects.
.. note::
- If no route URL pattern matches, no ``matchdict`` is attached to
- the request.
+ If no route URL pattern matches, the ``matchdict`` object attached to the
+ request will be ``None``.
.. index::
single: matched_route
@@ -855,6 +857,11 @@ an attribute of the :term:`request` object. Thus,
request. The most useful attribute of the route object is ``name``,
which is the name of the route that matched.
+.. note::
+
+ If no route URL pattern matches, the ``matched_route`` object attached to
+ the request will be ``None``.
+
Routing Examples
----------------
@@ -1141,6 +1148,7 @@ custom notfound view as the first argument to its constructor. For
instance:
.. code-block:: python
+ :linenos:
from pyramid.exceptions import NotFound
from pyramid.view import AppendSlashNotFoundViewFactory