summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingviews.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-02-12 02:54:37 -0600
committerMichael Merickel <michael@merickel.org>2016-02-12 02:54:37 -0600
commit23c2d7b337a5873dba0ca6c146e1174136ac2187 (patch)
tree22a57b6d3cfd607cfbc2cedefc92d1d3b0a831d0 /docs/tutorials/wiki2/definingviews.rst
parent4872a1e713f894b383990f62cf82c2b21f810c16 (diff)
downloadpyramid-23c2d7b337a5873dba0ca6c146e1174136ac2187.tar.gz
pyramid-23c2d7b337a5873dba0ca6c146e1174136ac2187.tar.bz2
pyramid-23c2d7b337a5873dba0ca6c146e1174136ac2187.zip
update the views/models with setup.py develop
Diffstat (limited to 'docs/tutorials/wiki2/definingviews.rst')
-rw-r--r--docs/tutorials/wiki2/definingviews.rst43
1 files changed, 8 insertions, 35 deletions
diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst
index 6629839f8..8bccc3fc0 100644
--- a/docs/tutorials/wiki2/definingviews.rst
+++ b/docs/tutorials/wiki2/definingviews.rst
@@ -14,13 +14,12 @@ and a user visits ``http://example.com/foo/bar``, our pattern would be matched
against ``/foo/bar`` and the ``matchdict`` would look like ``{'one':'foo',
'two':'bar'}``.
-Declaring dependencies in our ``setup.py`` file
-===============================================
+Adding the ``docutils`` dependency
+==================================
-The view code in our application will depend on a package which is not a
-dependency of the original "tutorial" application. The original "tutorial"
-application was generated by the ``pcreate`` command; it doesn't know
-about our custom application requirements.
+Remember in the previous chapter we added a new dependency on the ``bcrypt``
+package. Again, the view code in our application will depend on a package which
+is not a dependency of the original "tutorial" application.
We need to add a dependency on the ``docutils`` package to our ``tutorial``
package's ``setup.py`` file by assigning this dependency to the ``requires``
@@ -30,39 +29,13 @@ Open ``tutorial/setup.py`` and edit it to look like the following:
.. literalinclude:: src/views/setup.py
:linenos:
- :emphasize-lines: 20
+ :emphasize-lines: 13
:language: python
Only the highlighted line needs to be added.
-Running ``setup.py develop``
-============================
-
-Since a new software dependency was added, you will need to run ``python
-setup.py develop`` again inside the root of the ``tutorial`` package to obtain
-and register the newly added dependency distribution.
-
-Make sure your current working directory is the root of the project (the
-directory in which ``setup.py`` lives) and execute the following command.
-
-On UNIX:
-
-.. code-block:: bash
-
- $ cd tutorial
- $ $VENV/bin/python setup.py develop
-
-On Windows:
-
-.. code-block:: text
-
- c:\pyramidtut> cd tutorial
- c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop
-
-Success executing this command will end with a line to the console something
-like this::
-
- Finished processing dependencies for tutorial==0.0
+Again, as we did in the previous chapter, the dependency now needs to be
+installed so re-run the ``python setup.py develop`` command.
Adding view functions in ``views/default.py``
=============================================