From 210c0e43990e387bfafc38467ef09e5097c0daaf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Oct 2009 05:06:45 +0000 Subject: Move to renderers. --- docs/tutorials/bfgwiki2/basiclayout.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'docs/tutorials/bfgwiki2/basiclayout.rst') 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 ```` 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 ```` that will be used when the +#. *Lines 9-13*. Register a ```` that will be used when the URL is ``/``. Since this ```` 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 ```` statements in a - :term:`URL dispatch` based application to map URLs to code. - -#. *Lines 14-17*. Register a ```` directive that will match + response or a dictionary. You will use mostly ```` + 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 ```` 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 -- cgit v1.2.3