diff options
| author | Chris McDonough <chrism@plope.com> | 2010-12-23 20:01:42 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-12-23 20:01:42 -0500 |
| commit | b743bb4da42198f223ec756936dc0c581b08b534 (patch) | |
| tree | 73c030ae3ffd241f5dc3dcebb72de661d6afd57a /docs/tutorials/wiki/definingmodels.rst | |
| parent | d1138fdd4fe55358dcb583c5ddee3f45043d1fb5 (diff) | |
| download | pyramid-b743bb4da42198f223ec756936dc0c581b08b534.tar.gz pyramid-b743bb4da42198f223ec756936dc0c581b08b534.tar.bz2 pyramid-b743bb4da42198f223ec756936dc0c581b08b534.zip | |
tutorial accuracy and wording improvements
Diffstat (limited to 'docs/tutorials/wiki/definingmodels.rst')
| -rw-r--r-- | docs/tutorials/wiki/definingmodels.rst | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst index 078a8e014..f201f6dc7 100644 --- a/docs/tutorials/wiki/definingmodels.rst +++ b/docs/tutorials/wiki/definingmodels.rst @@ -38,12 +38,11 @@ we're not going to use it. .. note:: - There is nothing automagically special about the filename - ``models.py``. A project may have many models throughout its - codebase in arbitrarily-named files. Files implementing models - often have ``model`` in their filenames (or they may live in a - Python subpackage of your application package named ``models``) , - but this is only by convention. + There is nothing automagically special about the filename ``models.py``. A + project may have many models throughout its codebase in arbitrarily-named + files. Files implementing models often have ``model`` in their filenames, + or they may live in a Python subpackage of your application package named + ``models``, but this is only by convention. Then, we'll add a ``Wiki`` class. Because this is a ZODB application, this class should inherit from :class:`persistent.mapping.PersistentMapping`. We @@ -131,6 +130,22 @@ When we're done changing ``tests.py``, it will look something like so: :linenos: :language: python +Declaring Dependencies in Our ``setup.py`` File +----------------------------------------------- + +Our application now depends on packages which are not dependencies of the +original "tutorial" application as it was generated by the ``paster create`` +command. We'll add these dependencies to our ``tutorial`` package's +``setup.py`` file by assigning these dependencies to both the +``install_requires`` and the ``tests_require`` parameters to the ``setup`` +function. In particular, we require the ``docutils`` package. + +Our resulting ``setup.py`` should look like so: + +.. literalinclude:: src/models/setup.py + :linenos: + :language: python + Running the Tests ----------------- @@ -160,20 +175,3 @@ The expected output is something like this: OK -Declaring Dependencies in Our ``setup.py`` File ------------------------------------------------ - -Our application depends on packages which are not dependencies of the -original "tutorial" application as it was generated by the ``paster -create`` command. We'll add these dependencies to our ``tutorial`` -package's ``setup.py`` file by assigning these dependencies to both -the ``install_requires`` and the ``tests_require`` parameters to the -``setup`` function. In particular, we require the ``docutils`` -package. - -Our resulting ``setup.py`` should look like so: - -.. literalinclude:: src/models/setup.py - :linenos: - :language: python - |
