summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-05-10 21:22:53 +0000
committerChris McDonough <chrism@agendaless.com>2009-05-10 21:22:53 +0000
commit1658be8a7ea71e7661a0019188fbdd0c54e31fd5 (patch)
treeb894cfd4f9a13cbaea63630ec375683bedac1783
parent6f318ae12bff899a8d29d725384a94c389039eb2 (diff)
downloadpyramid-1658be8a7ea71e7661a0019188fbdd0c54e31fd5.tar.gz
pyramid-1658be8a7ea71e7661a0019188fbdd0c54e31fd5.tar.bz2
pyramid-1658be8a7ea71e7661a0019188fbdd0c54e31fd5.zip
- Added documentation to the URL Dispatch chapter about how to catch
the root URL.
-rw-r--r--CHANGES.txt6
-rw-r--r--docs/narr/urldispatch.rst18
2 files changed, 23 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 4f73d2895..759d84f47 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,12 @@
0.8dev (unreleased)
-------------------
+Features
+--------
+
+- Added documentation to the URL Dispatch chapter about how to catch
+ the root URL.
+
Bug Fixes
---------
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 9d843799b..7c2c71ad0 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -133,7 +133,7 @@ collection_name
condition_method
- The nameof the HTTP method used as the Routes `condition method
+ The name of the HTTP method used as the Routes `condition method
<http://routes.groovie.org/manual.html#conditions>`_.
condition_subdomain
@@ -362,6 +362,22 @@ When you do this, the :term:`view name` will be computed dynamically if
the route matches. In the above example, if the ``view_name`` turns
out to be ``articles``, the articles view will eventually be called.
+Catching the Root URL
+---------------------
+
+It's not entirely obvious how to use a route to catch the root URL
+("/"). To do so, give the empty string as a path in a ZCML ``route``
+declaration:
+
+.. code-block:: xml
+ :linenos:
+
+ <route
+ path=""
+ name="root"
+ view_name="root_view"
+ />
+
Using :mod:`repoze.bfg` Security With URL Dispatch
--------------------------------------------------