summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-11-27 22:04:31 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-11-27 22:04:31 -0700
commitcc0f6a2cf76e5cee3678446b0e226367dc96d158 (patch)
tree2e9ce26cd0ab997d5ed18a0976dd2cda30057d57 /docs/narr
parentef921f9724c9810f0147a10a5d5b9112bc2e9ce1 (diff)
parentb5f8a5ee066c39fb6be2f677551fd4211670b2de (diff)
downloadpyramid-cc0f6a2cf76e5cee3678446b0e226367dc96d158.tar.gz
pyramid-cc0f6a2cf76e5cee3678446b0e226367dc96d158.tar.bz2
pyramid-cc0f6a2cf76e5cee3678446b0e226367dc96d158.zip
Merge https://github.com/Pylons/pyramid
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/MyProject/myproject/__init__.py1
-rw-r--r--docs/narr/MyProject/myproject/static/footerbg.pngbin0 -> 333 bytes
-rw-r--r--docs/narr/MyProject/myproject/static/headerbg.pngbin0 -> 203 bytes
-rw-r--r--docs/narr/MyProject/myproject/static/ie6.css8
-rw-r--r--docs/narr/MyProject/myproject/static/logo.pngbin6641 -> 0 bytes
-rw-r--r--docs/narr/MyProject/myproject/static/middlebg.pngbin0 -> 2797 bytes
-rw-r--r--docs/narr/MyProject/myproject/static/pylons.css47
-rw-r--r--docs/narr/MyProject/myproject/static/pyramid.pngbin0 -> 33055 bytes
-rw-r--r--docs/narr/MyProject/myproject/static/transparent.gifbin0 -> 49 bytes
-rw-r--r--docs/narr/MyProject/myproject/templates/mytemplate.pt25
-rw-r--r--docs/narr/environment.rst18
-rw-r--r--docs/narr/handlers.rst4
-rw-r--r--docs/narr/project.pngbin81057 -> 84679 bytes
-rw-r--r--docs/narr/project.rst99
-rw-r--r--docs/narr/startup.rst6
-rw-r--r--docs/narr/urldispatch.rst3
16 files changed, 151 insertions, 60 deletions
diff --git a/docs/narr/MyProject/myproject/__init__.py b/docs/narr/MyProject/myproject/__init__.py
index 580dfe546..936404c82 100644
--- a/docs/narr/MyProject/myproject/__init__.py
+++ b/docs/narr/MyProject/myproject/__init__.py
@@ -10,3 +10,4 @@ def main(global_config, **settings):
renderer='myproject:templates/mytemplate.pt')
config.add_static_view('static', 'myproject:static')
return config.make_wsgi_app()
+
diff --git a/docs/narr/MyProject/myproject/static/footerbg.png b/docs/narr/MyProject/myproject/static/footerbg.png
new file mode 100644
index 000000000..1fbc873da
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/footerbg.png
Binary files differ
diff --git a/docs/narr/MyProject/myproject/static/headerbg.png b/docs/narr/MyProject/myproject/static/headerbg.png
new file mode 100644
index 000000000..0596f2020
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/headerbg.png
Binary files differ
diff --git a/docs/narr/MyProject/myproject/static/ie6.css b/docs/narr/MyProject/myproject/static/ie6.css
new file mode 100644
index 000000000..b7c8493d8
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/ie6.css
@@ -0,0 +1,8 @@
+* html img,
+* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
+this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
+this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
+this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
+);}
+#wrap{display:table;height:100%}
diff --git a/docs/narr/MyProject/myproject/static/logo.png b/docs/narr/MyProject/myproject/static/logo.png
deleted file mode 100644
index 88f5d9865..000000000
--- a/docs/narr/MyProject/myproject/static/logo.png
+++ /dev/null
Binary files differ
diff --git a/docs/narr/MyProject/myproject/static/middlebg.png b/docs/narr/MyProject/myproject/static/middlebg.png
new file mode 100644
index 000000000..2369cfb7d
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/middlebg.png
Binary files differ
diff --git a/docs/narr/MyProject/myproject/static/pylons.css b/docs/narr/MyProject/myproject/static/pylons.css
index c153be07f..33b21ac1a 100644
--- a/docs/narr/MyProject/myproject/static/pylons.css
+++ b/docs/narr/MyProject/myproject/static/pylons.css
@@ -4,34 +4,23 @@ body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-/* remember to define focus styles! */
:focus{outline:0;}
-/* remember to highlight inserts somehow! */
ins{text-decoration:none;}
del{text-decoration:line-through;}
-/* tables still need 'cellspacing="0"' in the markup */
table{border-collapse:collapse;border-spacing:0;}
-/* restyling */
sub{vertical-align:sub;font-size:smaller;line-height:normal;}
sup{vertical-align:super;font-size:smaller;line-height:normal;}
-/* lists */
ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
li{display:list-item;}
-/* nested lists have no top/bottom margins */
ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-/* 2 deep unordered lists use a circle */
ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-/* 3 deep (or more) unordered lists use a square */
ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
.hidden{display:none;}
p{line-height:1.5em;}
-h1{font-size:1.75em;/* 28px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;/* 24px */
-line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;/* 20px */
-line-height:1.7em;font-family:helvetica,verdana;}
+h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
+h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
+h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
html,body{width:100%;height:100%;}
body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
@@ -42,23 +31,25 @@ body h2,
body h3,
body h4,
body h5,
-body h6{font-family:"Nobile","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#144fb2;font-style:normal;}
-#wrap {min-height: 100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;}
-#header{background-color:#e88f00;top:0;font-size:14px;}
-#footer{background-color:#000000;bottom:0;position: relative;margin-top:-40px;clear:both;}
-.header,.footer{width:700px;margin-right:auto;margin-left:auto;}
+body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
+#wrap{min-height:100%;}
+#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
+#header{background:#000000;top:0;font-size:14px;}
+#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
+.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
.wrapper{width:100%}
#top,#bottom{width:100%;}
-#top{color:#888;background-color:#eee;height:300px;border-bottom:2px solid #ddd;}
-#bottom{color:#222;background-color:#ffffff;overflow:hidden;padding-bottom:80px;}
-.top,.bottom{width:700px;margin-right:auto;margin-left:auto;}
-.top{padding-top:100px;}
+#top{color:#000000;height:230px;
+background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
+#bottom{color:#222;background-color:#ffffff;}
+.top,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
+.top{padding-top:40px;}
+#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
.app-welcome{margin-top:25px;}
.app-name{color:#000000;font-weight:bold;}
.bottom{padding-top:50px;}
-#left{width:325px;float:left;padding-right:25px;}
-#right{width:325px;float:right;padding-left:25px;}
+#left{width:350px;float:left;padding-right:25px;}
+#right{width:350px;float:right;padding-left:25px;}
.align-left{text-align:left;}
.align-right{text-align:right;}
.align-center{text-align:center;}
@@ -67,7 +58,7 @@ ul.links li{list-style-type:none;font-size:14px;}
form{border-style:none;}
fieldset{border-style:none;}
input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text]{}
+input[type=text]{width:205px;}
input[type=submit]{background-color:#ddd;font-weight:bold;}
/*Opera Fix*/
-body:before {content:"";height:100%;float:left;width:0;margin-top:-32767px;}
+body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
diff --git a/docs/narr/MyProject/myproject/static/pyramid.png b/docs/narr/MyProject/myproject/static/pyramid.png
new file mode 100644
index 000000000..347e05549
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/pyramid.png
Binary files differ
diff --git a/docs/narr/MyProject/myproject/static/transparent.gif b/docs/narr/MyProject/myproject/static/transparent.gif
new file mode 100644
index 000000000..0341802e5
--- /dev/null
+++ b/docs/narr/MyProject/myproject/static/transparent.gif
Binary files differ
diff --git a/docs/narr/MyProject/myproject/templates/mytemplate.pt b/docs/narr/MyProject/myproject/templates/mytemplate.pt
index 6ad23d44f..02fc00eeb 100644
--- a/docs/narr/MyProject/myproject/templates/mytemplate.pt
+++ b/docs/narr/MyProject/myproject/templates/mytemplate.pt
@@ -7,21 +7,21 @@
<meta name="description" content="pyramid web application" />
<link rel="shortcut icon" href="${request.application_url}/static/favicon.ico" />
<link rel="stylesheet" href="${request.application_url}/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
+ <link href="http://fonts.googleapis.com/css?family=Neuton&amp;subset=latin" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Nobile:regular,italic,bold,bolditalic&amp;subset=latin" type="text/css" media="screen" charset="utf-8" />
- <!--[if !IE 7]>
- <style type="text/css">
- #wrap {display:table;height:100%}
- </style>
+ <!--[if lte IE 6]>
+ <link rel="stylesheet" href="${request.application_url}/static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
</head>
<body>
<div id="wrap">
- <div id="header">
- <div class="header">The Pyramid Web Application Development Framework</div>
- </div>
<div id="top">
<div class="top align-center">
- <img src="${request.application_url}/static/logo.png" width="300" height="80"/>
+ <div><img src="${request.application_url}/static/pyramid.png" width="750" height="169" alt="pyramid"/></div>
+ </div>
+ </div>
+ <div id="middle">
+ <div class="middle align-center">
<p class="app-welcome">
Welcome to <span class="app-name">${project}</span>, an application generated by<br/>
the Pyramid web application development framework.
@@ -31,22 +31,19 @@
<div id="bottom">
<div class="bottom">
<div id="left" class="align-right">
- <h3>Search Pyramid documentation</h3>
+ <h2>Search documentation</h2>
<form method="get" action="http://docs.pylonshq.com/pyramid/dev/search.html">
<input type="text" id="q" name="q" value="" />
- <input type="submit" id="x" value="Search" />
+ <input type="submit" id="x" value="Go" />
</form>
</div>
<div id="right" class="align-left">
- <h3>Pyramid links</h3>
+ <h2>Pyramid links</h2>
<ul class="links">
<li>
<a href="http://pylonshq.com">Pylons Website</a>
</li>
<li>
- <a href="http://docs.pylonshq.com/">The Pylons Project Documentation</a>
- </li>
- <li>
<a href="http://docs.pylonshq.com/pyramid/dev/#narrative-documentation">Narrative Documentation</a>
</li>
<li>
diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst
index ecf85e464..c3fe401ec 100644
--- a/docs/narr/environment.rst
+++ b/docs/narr/environment.rst
@@ -249,6 +249,24 @@ will be placed into the module level preamble of all generated Python modules.
| |
+-----------------------------+
+
+Mako Strict Undefined
++++++++++++++++++++++
+
+``true`` or ``false``, representing the "strict undefined" behavior of Mako
+(see `Mako Context Variables
+<http://www.makotemplates.org/docs/runtime.html#context-variables>`_). By
+default, this is ``false``.
+
++-----------------------------+
+| Config File Setting Name |
++=============================+
+| ``mako.strict_undefined`` |
+| |
+| |
+| |
++-----------------------------+
+
Examples
--------
diff --git a/docs/narr/handlers.rst b/docs/narr/handlers.rst
index 022f27115..d82f42bdb 100644
--- a/docs/narr/handlers.rst
+++ b/docs/narr/handlers.rst
@@ -168,8 +168,8 @@ information on the handler method which is used by
configuration.
All keyword arguments are recorded, and passed to
-:meth:`!pyramid.configuration.Configurator.add_view`. Any valid keyword
-arguments for :meth:`!pyramid.configuration.Configurator.add_view` can thus be
+:meth:`~pyramid.configuration.Configurator.add_view`. Any valid keyword
+arguments for :meth:`~pyramid.configuration.Configurator.add_view` can thus be
used with the :class:`~pyramid.view.action` decorator to further restrict when
the view will be called.
diff --git a/docs/narr/project.png b/docs/narr/project.png
index 78db4dbbe..da5bc870b 100644
--- a/docs/narr/project.png
+++ b/docs/narr/project.png
Binary files differ
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 225ced59c..c676917b4 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -268,7 +268,7 @@ points to *your application* as opposed to any other section within the
``.ini`` file. For example, if your application ``.ini`` file might have a
``[app:MyProject]`` section that looks like so:
-.. code-block:: ini
+.. code-block:: guess
:linenos:
[app:MyProject]
@@ -282,7 +282,7 @@ points to *your application* as opposed to any other section within the
If so, you can use the following command to invoke a debug shell using
the name ``MyProject`` as a section name:
-.. code-block:: text
+.. code-block:: text
[chrism@vitaminf shellenv]$ ../bin/paster pshell development.ini MyProject
Python 2.4.5 (#1, Aug 29 2008, 12:27:37)
@@ -299,7 +299,7 @@ happen, even if you have IPython installed, you can pass the
``--disable-ipython`` flag to the ``pshell`` command to use a standard
Python interpreter shell unconditionally.
-.. code-block:: text
+.. code-block:: text
[chrism@vitaminf shellenv]$ ../bin/paster pshell --disable-ipython \
development.ini MyProject
@@ -314,7 +314,7 @@ Python interpreter shell unconditionally.
than an ``app``. For example, if you have the following ``.ini`` file
content:
- .. code-block:: ini
+ .. code-block:: guess
:linenos:
[app:MyProject]
@@ -326,13 +326,15 @@ Python interpreter shell unconditionally.
default_locale_name = en
[pipeline:main]
- pipeline = egg:WebError#evalerror
- myapp
+ pipeline =
+ egg:WebError#evalerror
+ MyProject
- If you use ``main`` as the section name argument instead of ``myapp``
- against the above ``.ini`` file, an error will occur. Use the most
- specific reference to your application within the ``.ini`` file possible
- as the section name argument.
+ Use ``MyProject`` instead of ``main`` as the section name argument to
+ ``pshell`` against the above ``.ini`` file (e.g. ``paster pshell
+ development.ini MyProject``). If you use ``main`` instead, an error will
+ occur. Use the most specific reference to your application within the
+ ``.ini`` file possible as the section name argument.
Press ``Ctrl-D`` to exit the interactive shell (or ``Ctrl-Z`` on Windows).
@@ -442,7 +444,9 @@ name except for case). All :app:`Pyramid` ``paster`` -generated projects
share a similar structure.
The ``MyProject`` project we've generated has the following directory
-structure::
+structure:
+
+.. code-block:: text
MyProject/
|-- CHANGES.txt
@@ -503,6 +507,7 @@ serve``, as well as the deployment settings provided to that application.
The generated ``development.ini`` file looks like so:
.. literalinclude:: MyProject/development.ini
+ :language: guess
:linenos:
This file contains several "sections" including ``[app:MyProject]``,
@@ -628,6 +633,7 @@ distributing your application.
Our generated ``setup.py`` looks like this:
.. literalinclude:: MyProject/setup.py
+ :language: python
:linenos:
The ``setup.py`` file calls the setuptools ``setup`` function, which
@@ -665,7 +671,7 @@ file when distributing your application to other people, or when
versioning your application for your own use. For fun, you can try
this command now:
-.. code-block:: python
+.. code-block:: text
$ python setup.py sdist
@@ -696,6 +702,7 @@ contains various settings related to testing and internationalization:
Our generated ``setup.cfg`` looks like this:
.. literalinclude:: MyProject/setup.cfg
+ :language: guess
:linenos:
The values in the default setup file allow various commonly-used
@@ -743,6 +750,7 @@ This is the file named ``__init__.py``. The presence of an ``__init__.py``
also informs Python that the directory which contains it is a *package*.
.. literalinclude:: MyProject/myproject/__init__.py
+ :language: python
:linenos:
#. Line 1 imports the :term:`Configurator` class from
@@ -789,6 +797,7 @@ code which accepts a :term:`request` and which returns a
:term:`response`.
.. literalinclude:: MyProject/myproject/views.py
+ :language: python
:linenos:
This bit of code was registered as the view callable within ``__init__.py``
@@ -835,6 +844,7 @@ and provide APIs which mutate and return this data. We write a class
named ``MyModel`` that provides the behavior.
.. literalinclude:: MyProject/myproject/models.py
+ :language: python
:linenos:
#. Lines 1-2 define the MyModel class.
@@ -881,6 +891,7 @@ by view functions themselves. See :ref:`templates_used_directly` and
The ``tests.py`` module includes unit tests for your application.
.. literalinclude:: MyProject/myproject/tests.py
+ :language: python
:linenos:
This sample ``tests.py`` file has a single unit test defined within
@@ -891,3 +902,67 @@ provided as convenience and example.
See :ref:`unittesting_chapter` for more information about writing
:app:`Pyramid` unit tests.
+
+Modifying Package Structure
+----------------------------
+
+It is best practice for your application's code layout to not stray too much
+from accepted Pyramid paster template defaults. If you refrain from changing
+things very much, other Pyramid coders will be able to more quickly
+understand your application. However, the code layout choices made for you
+by a paster template are in no way magical or required. Despite the choices
+made for you by any paster template, you can decide to lay your code out any
+way you see fit.
+
+For example, the configuration method named
+:meth:`~pyramid.configuration.Configurator.add_view` requires you to pass a
+:term:`dotted Python name` or a direct object reference as the class or
+function to be used as a view. By default, the ``pyramid_starter`` paster
+template would have you add view functions to the ``views.py`` module in your
+package. However, you might be more comfortable creating a ``views``
+*directory*, and adding a single file for each view.
+
+If your project package name was ``myproject`` and you wanted to arrange all
+your views in a Python subpackage within the ``myproject`` :term:`package`
+named ``views`` instead of within a single ``views.py`` file, you might:
+
+- Create a ``views`` directory inside your ``mypackage`` package directory
+ (the same directory which holds ``views.py``).
+
+- *Move* the existing ``views.py`` file to a file inside the new ``views``
+ directory named, say, ``blog.py``.
+
+- Create a file within the new ``views`` directory named ``__init__.py`` (it
+ can be empty, this just tells Python that the ``views`` directory is a
+ *package*.
+
+Then change the __init__.py of your myproject project (*not* the
+``__init__.py`` you just created in the ``views`` directory, the one in its
+parent directory). For example, from something like:
+
+.. code-block:: python
+
+ config.add_view('myproject.views.my_view',
+ renderer='myproject:templates/mytemplate.pt')
+
+To this:
+
+.. code-block:: python
+
+ config.add_view('myproject.views.blogs.my_view',
+ renderer='myproject:templates/mytemplate.pt')
+
+You can then continue to add files to the ``views`` directory, and refer to
+views or handler classes/functions within those files via the dotted name
+passed as the first argument to ``add_view``. For example:
+
+.. code-block:: python
+
+ config.add_view('myproject.views.anothermodule.my_view',
+ renderer='myproject:templates/anothertemplate.pt')
+
+This pattern can be used to rearrage code referred to by any Pyramid API
+argument which accepts a :term:`dotted Python name` or direct object
+reference.
+
+
diff --git a/docs/narr/startup.rst b/docs/narr/startup.rst
index c57525f4c..427acc319 100644
--- a/docs/narr/startup.rst
+++ b/docs/narr/startup.rst
@@ -86,9 +86,9 @@ press ``return`` after running ``paster serve development.ini``.
:linenos:
In this case, the ``myproject.run:app`` function referred to by the entry
- point URI ``egg:MyProject#app`` (see :ref:`MyProject_ini` for more
- information about entry point URIs, and how they relate to callables),
- will receive the key/value pairs ``{'reload_templates':'true',
+ point URI ``egg:MyProject`` (see :ref:`MyProject_ini` for more information
+ about entry point URIs, and how they relate to callables), will receive
+ the key/value pairs ``{'reload_templates':'true',
'debug_authorization':'false', 'debug_notfound':'false',
'debug_templates':'true', 'default_locale_name':'en'}``.
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index dfb060d32..1b911a4a8 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -349,7 +349,8 @@ also capture the remainder of the URL, for example:
foo/{baz}/{bar}{fizzle:.*}
-The above pattern will match these URLs, generating the following matchdicts:
+The above pattern will match these URLs, generating the following
+matchdicts::
foo/1/2/ -> {'baz':'1', 'bar':'2', 'fizzle':()}
foo/abc/def/a/b/c -> {'baz':'abc', 'bar':'def', 'fizzle': 'a/b/c')}