From 6a32bb4831686a3da3a8277a3b08107dfa6fc6ac Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 14 Sep 2010 12:39:53 +0000 Subject: prep for 1.3a13 --- docs/narr/urldispatch.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'docs/narr') 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 ---------------- -- cgit v1.2.3