summaryrefslogtreecommitdiff
path: root/docs/narr/urldispatch.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr/urldispatch.rst')
-rw-r--r--docs/narr/urldispatch.rst11
1 files changed, 3 insertions, 8 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 749a2d49a..864257a33 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -70,14 +70,12 @@ via its ``route_name`` predicate, that view callable will always be found and
invoked when the associated route pattern matches during a request.
More commonly, you will not use any ``add_view`` statements in your project's
-"setup" code, instead only using ``add_route`` statements using a
-:term:`scan` for to associate view callables with routes. For example, if
+"setup" code. You will instead use ``add_route`` statements, and use a
+:term:`scan` to associate view callables with routes. For example, if
this is a portion of your project's ``__init__.py``:
.. code-block:: python
- # in your project's __init__.py (mypackage.__init__)
-
config.add_route('myroute', '/prefix/{one}/{two}')
config.scan('mypackage')
@@ -92,8 +90,6 @@ that references ``myroute`` as a ``route_name`` parameter:
.. code-block:: python
- # in your project's views.py module (mypackage.views)
-
from pyramid.view import view_config
from pyramid.response import Response
@@ -879,8 +875,7 @@ which you started the application from. For example:
.. code-block:: text
:linenos:
- [chrism@thinko pylonsbasic]$ PYRAMID_DEBUG_ROUTEMATCH=true \
- bin/pserve development.ini
+ $ PYRAMID_DEBUG_ROUTEMATCH=true bin/pserve development.ini
Starting server in PID 13586.
serving on 0.0.0.0:6543 view at http://127.0.0.1:6543
2010-12-16 14:45:19,956 no route matched for url \