diff options
| author | Carlos de la Guardia <cguardia@yahoo.com> | 2009-06-02 00:48:17 +0000 |
|---|---|---|
| committer | Carlos de la Guardia <cguardia@yahoo.com> | 2009-06-02 00:48:17 +0000 |
| commit | 143a5a69a50b86844f5470b95473a14d004e95c8 (patch) | |
| tree | a4f38400565ea663ea34592b1fe6a0870778ad5d /docs/tutorials | |
| parent | 48d624b4412da6f29938d1f355774aa9d1e8ae88 (diff) | |
| download | pyramid-143a5a69a50b86844f5470b95473a14d004e95c8.tar.gz pyramid-143a5a69a50b86844f5470b95473a14d004e95c8.tar.bz2 pyramid-143a5a69a50b86844f5470b95473a14d004e95c8.zip | |
corrected some mistakes in the mapping views sections and added more explanation text
Diffstat (limited to 'docs/tutorials')
| -rw-r--r-- | docs/tutorials/bfgwiki2/definingviews.rst | 13 |
1 files changed, 9 insertions, 4 deletions
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. |
