summaryrefslogtreecommitdiff
path: root/docs/narr/urldispatch.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-01-03 01:16:44 -0500
committerChris McDonough <chrism@plope.com>2011-01-03 01:16:44 -0500
commit45461e9e7d1d7f06669a57f421aa569a8dc86e31 (patch)
treede54a89e1ce5ff6c2742e40e2808b1d1057d4fec /docs/narr/urldispatch.rst
parentf8b6d2982292fe323008ad5af394786015206922 (diff)
parent419b2260ad97cbc9816b2fe075ef3d9acdb79581 (diff)
downloadpyramid-45461e9e7d1d7f06669a57f421aa569a8dc86e31.tar.gz
pyramid-45461e9e7d1d7f06669a57f421aa569a8dc86e31.tar.bz2
pyramid-45461e9e7d1d7f06669a57f421aa569a8dc86e31.zip
Merge git://github.com/caseman/pyramid into caseman-master
Diffstat (limited to 'docs/narr/urldispatch.rst')
-rw-r--r--docs/narr/urldispatch.rst41
1 files changed, 26 insertions, 15 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 0d28a0e96..c0b132a04 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -6,16 +6,28 @@
URL Dispatch
============
-:term:`URL dispatch` provides a simple way to map URLs :term:`view` code
-using a simple pattern matching language. An ordered set of patterns is
-checked one-by-one. If one of the patterns matches the path information
-associated with a request, a particular :term:`view callable` is invoked. If
-no route matches, :app:`Pyramid` falls back to trying to use
-:term:`traversal` to map the current request to a :term:`view callable`.
-
-The presence of calls to the :meth:`pyramid.config.Configurator.add_route`
-method within your application is a sign that you're using :term:`URL
-dispatch`.
+:term:`URL dispatch` provides a simple way to map URLs to :term:`view`
+code using a simple pattern matching language. An ordered set of
+patterns is checked one-by-one. If one of the patterns matches the path
+information associated with a request, a particular :term:`view
+callable` is invoked.
+
+:term:`URL dispatch` is one of two ways to perform :term:`resource
+location` in :app:`Pyramid`; the other way is using :term:`traversal`.
+If no route is matched using :term:`URL dispatch`, :app:`Pyramid` falls
+back to :term:`traversal` to handle the :term:`request`.
+
+It is the responsibility of the :term:`resource location` subsystem
+(i.e., :term:`URL dispatch` or :term:`traversal`) to find the resource
+object that is the :term:`context` of the :term:`request`. Once the
+:term:`context` is determined, :term:`view lookup` is then responsible
+for finding and invoking a :term:`view callable`. A view callable is a
+specific bit of code, defined in your application, that receives the
+:term:`request` and returns a :term:`response` object.
+
+Where appropriate, we will describe how view lookup interacts with
+:term:`resource location`. The :ref:`views_chapter` chapter describes
+the details of :term:`view lookup`.
High-Level Operational Overview
-------------------------------
@@ -24,10 +36,9 @@ If route configuration is present in an application, the :app:`Pyramid`
:term:`Router` checks every incoming request against an ordered set of URL
matching patterns present in a *route map*.
-If any route pattern matches the information in the :term:`request` provided
-to :app:`Pyramid`, :app:`Pyramid` will shortcut :term:`traversal`, and will
-invoke :term:`view lookup` using a :term:`context` resource generated by the
-route match.
+If any route pattern matches the information in the :term:`request`,
+:app:`Pyramid` will invoke :term:`view lookup` using a :term:`context`
+resource generated by the route match.
However, if no route pattern matches the information in the :term:`request`
provided to :app:`Pyramid`, it will fail over to using :term:`traversal` to
@@ -72,7 +83,7 @@ example:
.. versionchanged:: 1.0a4
Prior to 1.0a4, routes allow for a marker starting with a ``:``, for
- example ``/prefix/:one/:two``. Starting in 1.0a4, this style is deprecated
+ example ``/prefix/:one/:two``. This style is now deprecated
in favor or ``{}`` usage which allows for additional functionality.
.. index::