summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/basiclayout.rst
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2013-03-21 13:47:41 -0700
committerTres Seaver <tseaver@palladion.com>2013-03-21 13:47:41 -0700
commit4b4d695f704ec5a2965b5d2a8d41860047841f6f (patch)
tree2348b1e72d1d82ba40d0e156f0e2e56265ff8030 /docs/tutorials/wiki2/basiclayout.rst
parent056b0901b4577cbbee1ae37f462cbcf7f247880e (diff)
parentbb8e20e0d35dc806e19edc6d07c837ec272128ec (diff)
downloadpyramid-4b4d695f704ec5a2965b5d2a8d41860047841f6f.tar.gz
pyramid-4b4d695f704ec5a2965b5d2a8d41860047841f6f.tar.bz2
pyramid-4b4d695f704ec5a2965b5d2a8d41860047841f6f.zip
Merge pull request #921 from pzatrick/master
Updates to Wiki2
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst19
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index eb2445864..6d6287126 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -132,11 +132,11 @@ Finally, ``main`` is finished configuring things, so it uses the
View Declarations via ``views.py``
----------------------------------
-Mapping a :term:`route` to code that will be executed when a match for
-the route's pattern occurs is done by registering a :term:`view
-configuration`. Our application uses the
-:meth:`pyramid.view.view_config` decorator to map view callables to
-each route, thereby mapping URL patterns to code.
+Arguably, the main function of a web framework is mapping each URL
+patterns, see :term:`route`, to code, see :term:`view callable`, that is
+executed when the requested URL matches the corresponding :term:`route`. Our
+application uses the :meth:`pyramid.view.view_config` decorator to perform
+this mapping.
Open ``tutorial/tutorial/views.py``. It should already contain the following:
@@ -228,11 +228,10 @@ To give a simple example of a model class, we define one named ``MyModel``:
Our example model has an ``__init__`` method that takes two arguments
(``name``, and ``value``). It stores these values as ``self.name`` and
-``self.value``
-within the ``__init__`` function itself. The ``MyModel`` class also has a
-``__tablename__`` attribute. This informs SQLAlchemy which table to use to
-store the data representing instances of this class.
+``self.value`` within the ``__init__`` function itself. The ``MyModel`` class
+also has a ``__tablename__`` attribute. This informs SQLAlchemy which table
+to use to store the data representing instances of this class.
-That's about all there is to it to models, views, and initialization code in
+That's about all there is to it with models, views, and initialization code in
our stock application.