summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-01-16 10:01:29 -0600
committerGitHub <noreply@github.com>2020-01-16 10:01:29 -0600
commit9c153e1250e00faa06003c10c3a26886489e6210 (patch)
tree0bb4743f9e793e73c5f7a369d5744a1eff2e9c00 /docs/tutorials/wiki2/definingmodels.rst
parent912bccb8b715b0249c2c23736c467eaee14a4e3b (diff)
parentcc26acfd29c94036d1c4d9164dba6a2b7792c00a (diff)
downloadpyramid-9c153e1250e00faa06003c10c3a26886489e6210.tar.gz
pyramid-9c153e1250e00faa06003c10c3a26886489e6210.tar.bz2
pyramid-9c153e1250e00faa06003c10c3a26886489e6210.zip
Merge pull request #3557 from mmerickel/security-docs
update docs to use security policy
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.