diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-12-27 15:32:14 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-12-27 15:32:14 +0000 |
| commit | e4e3aa3449d3ae390402a9cead205626816a2938 (patch) | |
| tree | cdab3582902124055fedfb3d0320157c983638fe /docs/narr/urlmapping.rst | |
| parent | 878328bdfc3b5ac832f1728e4a0461e3129cf8d4 (diff) | |
| download | pyramid-e4e3aa3449d3ae390402a9cead205626816a2938.tar.gz pyramid-e4e3aa3449d3ae390402a9cead205626816a2938.tar.bz2 pyramid-e4e3aa3449d3ae390402a9cead205626816a2938.zip | |
Rendering cleanups.
Diffstat (limited to 'docs/narr/urlmapping.rst')
| -rw-r--r-- | docs/narr/urlmapping.rst | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/narr/urlmapping.rst b/docs/narr/urlmapping.rst index 2eeaa0646..e5933ae1e 100644 --- a/docs/narr/urlmapping.rst +++ b/docs/narr/urlmapping.rst @@ -38,10 +38,12 @@ item "below" ``members`` in the URL represents a member in the system. You just match everything "below" ``members`` to a particular view. For example, you might configure a :term:`route` to match against the -following URL patterns:: +following URL patterns: - archives/:year/:month/:day - members/:membername +.. code-block:: text + + archives/:year/:month/:day + members/:membername In this configuration, there are exactly two types of URLs that will match views in your application: ones that start with ``/archives`` @@ -50,10 +52,12 @@ day. And ones that start with ``/members`` which are followed by a path segment containing a member's name. This is very simple. :term:`URL dispatch` is not very good, however, at inferring the -difference between sets of URLs such as:: +difference between sets of URLs such as: + +.. code-block:: text - http://example.com/members/Chris/document - http://example.com/members/Chris/stuff/page + http://example.com/members/Chris/document + http://example.com/members/Chris/stuff/page ...wherein you'd like the ``document`` in the first URL to represent a PDF document, and ``/stuff/page`` in the second to represent an |
