summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-06-22 00:30:36 +0000
committerChris McDonough <chrism@agendaless.com>2009-06-22 00:30:36 +0000
commit8c9514b39afe7bcd18c5e5e8682100d23117861b (patch)
tree576874ae707a37676a85242e67ecf29cc38c74fd /docs/tutorials
parente2062b4a1eb0afa179dbf25a29eda841eaccb86c (diff)
downloadpyramid-8c9514b39afe7bcd18c5e5e8682100d23117861b.tar.gz
pyramid-8c9514b39afe7bcd18c5e5e8682100d23117861b.tar.bz2
pyramid-8c9514b39afe7bcd18c5e5e8682100d23117861b.zip
Back to *subpath in urldispatch tutorial.
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/bfgwiki2/basiclayout.rst13
-rw-r--r--docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml3
-rw-r--r--docs/tutorials/bfgwiki2/src/basiclayout/tutorial/configure.zcml3
-rw-r--r--docs/tutorials/bfgwiki2/src/models/tutorial/configure.zcml3
-rw-r--r--docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml3
5 files changed, 15 insertions, 10 deletions
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 ``<route>`` statements in a
:term:`URL dispatch` based application to map URLs to code.
-#. *Lines 14-17*. Register a ``<view>`` 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. ``<view>``
- 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 ``<route>`` 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
diff --git a/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml
index 06a32c749..2904b0793 100644
--- a/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml
+++ b/docs/tutorials/bfgwiki2/src/authorization/tutorial/configure.zcml
@@ -6,7 +6,8 @@
<subscriber for="repoze.bfg.interfaces.INewRequest"
handler=".run.handle_teardown"/>
- <view
+ <route
+ path="/static/*subpath"
name="static"
view=".views.static_view"
/>
diff --git a/docs/tutorials/bfgwiki2/src/basiclayout/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/basiclayout/tutorial/configure.zcml
index 4d1a16612..f6139f85e 100644
--- a/docs/tutorials/bfgwiki2/src/basiclayout/tutorial/configure.zcml
+++ b/docs/tutorials/bfgwiki2/src/basiclayout/tutorial/configure.zcml
@@ -11,7 +11,8 @@
view=".views.my_view"
/>
- <view
+ <route
+ path="/static/*subpath"
name="static"
view=".views.static_view"
/>
diff --git a/docs/tutorials/bfgwiki2/src/models/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/models/tutorial/configure.zcml
index 4d1a16612..f6139f85e 100644
--- a/docs/tutorials/bfgwiki2/src/models/tutorial/configure.zcml
+++ b/docs/tutorials/bfgwiki2/src/models/tutorial/configure.zcml
@@ -11,7 +11,8 @@
view=".views.my_view"
/>
- <view
+ <route
+ path="/static/*subpath"
name="static"
view=".views.static_view"
/>
diff --git a/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml b/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml
index 9d936c6d3..3a7ff7fc8 100644
--- a/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml
+++ b/docs/tutorials/bfgwiki2/src/views/tutorial/configure.zcml
@@ -6,7 +6,8 @@
<subscriber for="repoze.bfg.interfaces.INewRequest"
handler=".run.handle_teardown"/>
- <view
+ <route
+ path="/static/*subpath"
name="static"
view=".views.static_view"
/>