diff options
| author | Chris McDonough <chrism@plope.com> | 2013-03-23 03:12:42 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2013-03-23 03:12:42 -0400 |
| commit | e7b21013bab17d5eccdc60f6125cc898996021cf (patch) | |
| tree | 05c24b5b224565457708c9d3589745ac93ba8c15 /docs/tutorials/wiki2/basiclayout.rst | |
| parent | e34541a752384e5fa432c2b14003211dc11f223a (diff) | |
| download | pyramid-e7b21013bab17d5eccdc60f6125cc898996021cf.tar.gz pyramid-e7b21013bab17d5eccdc60f6125cc898996021cf.tar.bz2 pyramid-e7b21013bab17d5eccdc60f6125cc898996021cf.zip | |
change some slightly awkward wording
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
| -rw-r--r-- | docs/tutorials/wiki2/basiclayout.rst | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst index 6d6287126..0193afab4 100644 --- a/docs/tutorials/wiki2/basiclayout.rst +++ b/docs/tutorials/wiki2/basiclayout.rst @@ -132,11 +132,10 @@ Finally, ``main`` is finished configuring things, so it uses the View Declarations via ``views.py`` ---------------------------------- -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. +The main function of a web framework is mapping each URL pattern to code (a +: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,10 +227,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. - -That's about all there is to it with models, views, and initialization code in -our stock application. +``self.value`` on the instance created by 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 regarding models, views, and initialization +code in our stock application. |
