summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-01-16 10:09:45 -0600
committerMichael Merickel <michael@merickel.org>2020-01-16 10:09:45 -0600
commita7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9 (patch)
tree8aca99052f7086bcb37609b516d7a11902377d71 /docs/tutorials/wiki2/definingmodels.rst
parenteb7046c8eeb8c9b598260ae8c8976187a8f84953 (diff)
parent9c153e1250e00faa06003c10c3a26886489e6210 (diff)
downloadpyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.tar.gz
pyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.tar.bz2
pyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.zip
Merge branch 'master' into move-acl-security-to-authorization
Diffstat (limited to 'docs/tutorials/wiki2/definingmodels.rst')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index 4b80e09ac..129d77806 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -29,20 +29,23 @@ We need to add a dependency, the `bcrypt <https://pypi.org/project/bcrypt/>`_ pa
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:
+Open ``tutorial/setup.py`` and edit it to look like the following by adding ``bcrypt`` and sorting the packages:
.. literalinclude:: src/models/setup.py
+ :lines: 11-24
:linenos:
- :emphasize-lines: 11-24
+ :lineno-match:
+ :emphasize-lines: 3
:language: python
It is a good practice to sort packages alphabetically to make them easier to find.
Our cookiecutter does not have its packages sorted because it merely tacks on additional packages depending on our selections.
-After adding ``bcrypt`` and sorting packages, we should have the above ``requires`` list.
.. note::
- We are using the ``bcrypt`` package from PyPI to hash our passwords securely. There are other one-way hash algorithms for passwords if ``bcrypt`` is an issue on your system. Just make sure that it's an algorithm approved for storing passwords versus a generic one-way hash.
+ We are using the ``bcrypt`` package from PyPI to hash our passwords securely.
+ There are other one-way hash algorithms for passwords if ``bcrypt`` is an issue on your system.
+ Just make sure that it's an algorithm approved for storing passwords versus a generic one-way hash.
Running ``pip install -e .``
@@ -245,7 +248,7 @@ following:
.. literalinclude:: src/models/tutorial/scripts/initialize_db.py
:linenos:
:language: python
- :emphasize-lines: 11-24
+ :emphasize-lines: 15-28
Only the highlighted lines need to be changed.