From 0ac7b075f76b3989fe9eb763b73bab827c9deccd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 25 Dec 2009 06:44:37 +0000 Subject: Fix syntax errors found via manuel, and add manuel-style markers to prevent untestable code blocks from being tested. --- docs/tutorials/bfgwiki/authorization.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/tutorials/bfgwiki/authorization.rst') diff --git a/docs/tutorials/bfgwiki/authorization.rst b/docs/tutorials/bfgwiki/authorization.rst index 8d3f08d6a..cb0f8439e 100644 --- a/docs/tutorials/bfgwiki/authorization.rst +++ b/docs/tutorials/bfgwiki/authorization.rst @@ -80,15 +80,18 @@ 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 into 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 each view that has an associated ``renderer`` to pass the `resulting `logged_in`` value to the -template, e.g.: +template. For example: +.. ignore-next-block .. code-block:: python :linenos: -- cgit v1.2.3