summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-09-14 12:39:53 +0000
committerChris McDonough <chrism@agendaless.com>2010-09-14 12:39:53 +0000
commit6a32bb4831686a3da3a8277a3b08107dfa6fc6ac (patch)
treef3ad9d6da7f71079f945ebedaa5dc700f9e25186 /docs/narr
parent70f1cda02f9acccf7ee1c8ad1a7ade36fba10dba (diff)
downloadpyramid-6a32bb4831686a3da3a8277a3b08107dfa6fc6ac.tar.gz
pyramid-6a32bb4831686a3da3a8277a3b08107dfa6fc6ac.tar.bz2
pyramid-6a32bb4831686a3da3a8277a3b08107dfa6fc6ac.zip
prep for 1.3a13
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/urldispatch.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index b7c71da6a..edf954587 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -806,6 +806,20 @@ strings. The values will be Unicode objects.
If no route URL pattern matches, no ``matchdict`` is attached to
the request.
+.. index::
+ single: matched_route
+
+The Matched Route
+~~~~~~~~~~~~~~~~~
+
+When the URL pattern associated with a particular route configuration
+is matched by a request, an object named ``matched_route`` is added as
+an attribute of the :term:`request` object. Thus,
+``request.matched_route`` will be an object implementing the
+:class:`repoze.bfg.interfaces.IRoute` interface which matched the
+request. The most useful attribute of the route object is ``name``,
+which is the name of the route that matched.
+
Routing Examples
----------------