From 8c9514b39afe7bcd18c5e5e8682100d23117861b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 22 Jun 2009 00:30:36 +0000 Subject: Back to *subpath in urldispatch tutorial. --- docs/tutorials/bfgwiki2/basiclayout.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'docs/tutorials/bfgwiki2/basiclayout.rst') diff --git a/docs/tutorials/bfgwiki2/basiclayout.rst b/docs/tutorials/bfgwiki2/basiclayout.rst index 8809bc503..4b549caf7 100644 --- a/docs/tutorials/bfgwiki2/basiclayout.rst +++ b/docs/tutorials/bfgwiki2/basiclayout.rst @@ -40,12 +40,13 @@ XML namespace. Our sample ZCML file looks like the following: response. You will use mostly ```` statements in a :term:`URL dispatch` based application to map URLs to code. -#. *Lines 14-17*. Register a ```` with a path that starts with - ``/static``. This points at a bit of code (``.views.static_view``) - that will serve up static resources for us, in this case, at - ``http://localhost:6543/static/`` and below. ```` - declarations also map code to URLs like ``route`` statements, - except they match URLs based on :term:`traversal`. With this view +#. *Lines 14-17*. Register a ```` that will match with a path + that starts with ``/static/``. This points at a bit of code + (``.views.static_view``) that will serve up static resources for + us, in this case, at ``http://localhost:6543/static/`` and below. + The ``*subpath`` token captures the remainder of the path and sets + the request :term:`subpath` to a derivation of the remainder of the + path, which is relied on by the view it mentions. With this view declaration, we're saying that any URL that starts with ``/static`` should go to the static view; any remainder of its path (e.g. the ``/foo`` in ``/static/foo``) will be used to compose a path to a -- cgit v1.2.3