summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-02-12 02:42:04 -0600
committerMichael Merickel <michael@merickel.org>2016-02-12 02:42:04 -0600
commita115c6d30fe8e497f67604370db4ffc8f2b124a9 (patch)
tree9d49fba96848888bad4136c9531a98c491d49f61 /docs
parent574ba1aa6d81498220d123d149192eeba81afee7 (diff)
downloadpyramid-a115c6d30fe8e497f67604370db4ffc8f2b124a9.tar.gz
pyramid-a115c6d30fe8e497f67604370db4ffc8f2b124a9.tar.bz2
pyramid-a115c6d30fe8e497f67604370db4ffc8f2b124a9.zip
add the bcrypt dependency
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst22
-rw-r--r--docs/tutorials/wiki2/design.rst8
2 files changed, 27 insertions, 3 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index beb6cee5a..33e7beb4f 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -15,6 +15,28 @@ be to define a wiki page :term:`domain model`.
but this is only a convention and not a requirement.
+Declaring dependencies in our ``setup.py`` file
+===============================================
+
+The models 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.
+
+We need to add a dependency on the ``bcrypt`` package to our ``tutorial``
+package's ``setup.py`` file by assigning this dependency to the ``requires``
+parameter in the ``setup()`` function.
+
+Open ``tutorial/setup.py`` and edit it to look like the following:
+
+.. literalinclude:: src/models/setup.py
+ :linenos:
+ :emphasize-lines: 12
+ :language: python
+
+Only the highlighted line needs to be added.
+
+
Remove ``mymodel.py``
---------------------
diff --git a/docs/tutorials/wiki2/design.rst b/docs/tutorials/wiki2/design.rst
index 42f06f7bf..de43447d3 100644
--- a/docs/tutorials/wiki2/design.rst
+++ b/docs/tutorials/wiki2/design.rst
@@ -21,12 +21,14 @@ We'll be using an SQLite database to hold our wiki data, and we'll be using
Within the database, we will define two tables:
-- The `users` table which will store the `name`, `password_hash` and `role`.
+- The `users` table which will store the `id`, `name`, `password_hash` and
+ `role` of each wiki user.
- The `pages` table, whose elements will store the wiki pages.
- There are three columns: `name`, `data` and `creator_id`.
+ There are four columns: `id`, `name`, `data` and `creator_id`.
There is a one-to-many relationship between `users` and `pages` tracking
-the user who created each wiki page.
+the user who created each wiki page defined by the `creator_id` column on the
+`pages` table.
URLs like ``/PageName`` will try to find an element in the `pages` table that
has a corresponding name.