summaryrefslogtreecommitdiff
path: root/docs/tutorials/bfgwiki2/basiclayout.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-10-10 05:06:45 +0000
committerChris McDonough <chrism@agendaless.com>2009-10-10 05:06:45 +0000
commit210c0e43990e387bfafc38467ef09e5097c0daaf (patch)
tree88df0616192d52e947835448334e1e8fbb09c44c /docs/tutorials/bfgwiki2/basiclayout.rst
parentb1909e621396beebc801b1cdadb568d452fdc0c7 (diff)
downloadpyramid-210c0e43990e387bfafc38467ef09e5097c0daaf.tar.gz
pyramid-210c0e43990e387bfafc38467ef09e5097c0daaf.tar.bz2
pyramid-210c0e43990e387bfafc38467ef09e5097c0daaf.zip
Move to renderers.
Diffstat (limited to 'docs/tutorials/bfgwiki2/basiclayout.rst')
-rw-r--r--docs/tutorials/bfgwiki2/basiclayout.rst16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/tutorials/bfgwiki2/basiclayout.rst b/docs/tutorials/bfgwiki2/basiclayout.rst
index 9efee63a7..1cdcd425e 100644
--- a/docs/tutorials/bfgwiki2/basiclayout.rst
+++ b/docs/tutorials/bfgwiki2/basiclayout.rst
@@ -28,21 +28,25 @@ following:
#. *Line 1*. The root ``<configure>`` element, in a ``bfg``
namespace.
-#. *Line 3*. Boilerplate, the comment explains.
+#. *Line 4*. Boilerplate, the comment explains.
#. *Lines 6-7*. Register a :term:`subscriber` that tears down the
SQLAlchemy connection after a request is finished.
-#. *Lines 9-12*. Register a ``<route>`` that will be used when the
+#. *Lines 9-13*. Register a ``<route>`` that will be used when the
URL is ``/``. Since this ``<route>`` has an empty ``path``
attribute, it is the "default" route. The attribute named ``view``
with the value ``.views.my_view`` is the dotted name to a
*function* we write (generated by the ``bfg_routesalchemy``
template) that is given a ``request`` object and which returns a
- response. You will use mostly ``<route>`` statements in a
- :term:`URL dispatch` based application to map URLs to code.
-
-#. *Lines 14-17*. Register a ``<static>`` directive that will match
+ response or a dictionary. You will use mostly ``<route>``
+ statements in a :term:`URL dispatch` based application to map URLs
+ to code. This ``route`` also names a ``renderer``, which is a
+ template which lives in the ``templates`` subdirectory of the
+ package. When the ``.views.my_view`` view returns a dictionary,
+ a "renderer" will use this template to create a response.
+
+#. *Lines 15-18*. Register a ``<static>`` directive that will match
any URL hat starts with ``/static/``. This will serve up static
resources for us, in this case, at
``http://localhost:6543/static/`` and below. With this