summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/authorization.rst
diff options
context:
space:
mode:
authorPatricio Paez <pp@pp.com.mx>2012-04-07 21:01:25 -0500
committerPatricio Paez <pp@pp.com.mx>2012-04-07 21:08:42 -0500
commit6c3dd2f690c1a92aaf396d44f4b9450a477a67fc (patch)
tree67b99007581bb50cefc360bd64359708287bd444 /docs/tutorials/wiki2/authorization.rst
parent9168ec5a6b96824b35788bf7f1ab5cadb236b392 (diff)
downloadpyramid-6c3dd2f690c1a92aaf396d44f4b9450a477a67fc.tar.gz
pyramid-6c3dd2f690c1a92aaf396d44f4b9450a477a67fc.tar.bz2
pyramid-6c3dd2f690c1a92aaf396d44f4b9450a477a67fc.zip
Normalize Authorization in both tutorials 2
- Sync content of Add users and groups, and Add an ACL. - Added yellow highlight to listings in Seeing our changes, added models.py
Diffstat (limited to 'docs/tutorials/wiki2/authorization.rst')
-rw-r--r--docs/tutorials/wiki2/authorization.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst
index dcbea2b42..75037da5f 100644
--- a/docs/tutorials/wiki2/authorization.rst
+++ b/docs/tutorials/wiki2/authorization.rst
@@ -104,7 +104,7 @@ principal the `edit` permission.
The ``RootFactory`` class that contains the ACL is a :term:`root factory`.
We need to associate it to our :app:`Pyramid` application, so the ACL is
-provided to each view as the :term:`context` of each request, as
+provided to each view in the :term:`context` of the request, as
the ``context`` attribute.
Open ``tutorial/tutorial/__init__.py`` and add a ``root_factory``
@@ -321,6 +321,16 @@ when we're done:
(Only the highlighted lines need to be added.)
+Our ``tutorial/tutorial/models.py`` will look something like this
+when we're done:
+
+.. literalinclude:: src/authorization/tutorial/models.py
+ :linenos:
+ :emphasize-lines: 1-4,35-39
+ :language: python
+
+(Only the highlighted lines need to be added.)
+
Our ``tutorial/tutorial/views.py`` will look something like this
when we're done: