diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-12-25 06:44:37 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-12-25 06:44:37 +0000 |
| commit | 0ac7b075f76b3989fe9eb763b73bab827c9deccd (patch) | |
| tree | 50c8d7d38837cb468af45ee90e34efec21bf3e73 /docs/tutorials/bfgwiki2/authorization.rst | |
| parent | a0169ff21b5cd7446bf0289bffdb52de8dc61290 (diff) | |
| download | pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.gz pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.tar.bz2 pyramid-0ac7b075f76b3989fe9eb763b73bab827c9deccd.zip | |
Fix syntax errors found via manuel, and add manuel-style markers to prevent
untestable code blocks from being tested.
Diffstat (limited to 'docs/tutorials/bfgwiki2/authorization.rst')
| -rw-r--r-- | docs/tutorials/bfgwiki2/authorization.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/tutorials/bfgwiki2/authorization.rst b/docs/tutorials/bfgwiki2/authorization.rst index 9aeb98505..df93cb454 100644 --- a/docs/tutorials/bfgwiki2/authorization.rst +++ b/docs/tutorials/bfgwiki2/authorization.rst @@ -140,18 +140,21 @@ Then we need to change each of our ``view_page``, ``edit_page`` and ``add_page`` views in ``views.py`` to pass a "logged in" parameter to its template. We'll add something like this to each view body: +.. ignore-next-block .. code-block:: python :linenos: + from repoze.bfg.security import authenticated_userid logged_in = authenticated_userid(request) We'll then change the return value of these views to pass the `resulting `logged_in`` value to the template, e.g.: +.. ignore-next-block .. code-block:: python :linenos: - return dict(page = page, + return dict(page = context, content = content, logged_in = logged_in, edit_url = edit_url) |
