From 143a5a69a50b86844f5470b95473a14d004e95c8 Mon Sep 17 00:00:00 2001 From: Carlos de la Guardia Date: Tue, 2 Jun 2009 00:48:17 +0000 Subject: corrected some mistakes in the mapping views sections and added more explanation text --- docs/tutorials/bfgwiki2/definingviews.rst | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/tutorials/bfgwiki2/definingviews.rst b/docs/tutorials/bfgwiki2/definingviews.rst index e2f96cf50..4d90db11f 100644 --- a/docs/tutorials/bfgwiki2/definingviews.rst +++ b/docs/tutorials/bfgwiki2/definingviews.rst @@ -236,7 +236,12 @@ Mapping Views to URLs in ``configure.zcml`` The ``configure.zcml`` file contains ``route`` declarations which serve to map URLs (via :term:`url dispatch`) to view functions. -You'll need to add five ``view`` declarations to ``configure.zcml``. +First, we’ll get rid of the existing ``route`` created by the +template using the name ``home``. It’s only an example and isn’t +relevant to our application. We'll leave the static ``route`` +declaration as it is, since we are going to use it for the CSS. + +We then need to add four ``view`` declarations to ``configure.zcml``. Note that the *ordering* of these declarations is very important. ``route`` declarations are matched in the order they're found in the ``configure.zcml`` file. @@ -246,11 +251,11 @@ Note that the *ordering* of these declarations is very important. the name ``view_wiki``. This is the default view for the wiki. #. Add a declaration which maps the path pattern ``:pagename`` to the - view named ``edit_page`` in our ``views.py`` file with the view - name ``view_page``. This is the edit view for a page. + view named ``view_page`` in our ``views.py`` file with the view + name ``view_page``. This is the regular view for a page. #. Add a declaration which maps the path pattern - ``:pagename/edit_page`` to the view named ``view_page`` in our + ``:pagename/edit_page`` to the view named ``edit_page`` in our ``views.py`` file with the name ``edit_page``. This is the edit view for a page. -- cgit v1.2.3