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 ++++- docs/tutorials/bfgwiki/viewdecorators.rst | 5 ++++- docs/tutorials/bfgwiki2/authorization.rst | 5 ++++- docs/tutorials/gae/index.rst | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'docs/tutorials') 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: diff --git a/docs/tutorials/bfgwiki/viewdecorators.rst b/docs/tutorials/bfgwiki/viewdecorators.rst index a1b2810d8..265adac4f 100644 --- a/docs/tutorials/bfgwiki/viewdecorators.rst +++ b/docs/tutorials/bfgwiki/viewdecorators.rst @@ -45,6 +45,7 @@ The ``view_wiki`` view function The decorator above the ``view_wiki`` function will be: +.. ignore-next-block .. code-block:: python :linenos: @@ -70,6 +71,7 @@ The ``view_page`` view function The decorator above the ``view_page`` function will be: +.. ignore-next-block .. code-block:: python :linenos: @@ -96,6 +98,7 @@ The ``add_page`` view function The decorator above the ``add_page`` function will be: +.. ignore-next-block .. code-block:: python :linenos: @@ -122,6 +125,7 @@ The ``edit_page`` view function The decorator above the ``edit_page`` function will be: +.. ignore-next-block .. code-block:: python :linenos: @@ -195,7 +199,6 @@ On Windows: .. code-block:: bat - c:\bigfntut\tutorial> ..\Scripts\python setup.py test -q Hopefully nothing will have changed. The expected result looks 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) diff --git a/docs/tutorials/gae/index.rst b/docs/tutorials/gae/index.rst index e24866c77..8d7f89311 100644 --- a/docs/tutorials/gae/index.rst +++ b/docs/tutorials/gae/index.rst @@ -186,7 +186,7 @@ system. HTTPError: HTTP Error 400: Bad Request Rolling back the update. Error 400: --- begin server output --- - Max number of files and blobs is 1000. + Max number of files and blobs is 3000. --- end server output --- If you do experience this error, you will be able to get around @@ -243,7 +243,7 @@ First, see which packages are available for zipping: .. code-block:: bash :linenos: - $ bin/pip zip -l + $ bin/pip zip -l This shows your zipped packages (by default, none) and your unzipped packages. You can zip a package like so: @@ -251,7 +251,7 @@ packages. You can zip a package like so: .. code-block:: bash :linenos: - $ bin/pip zip pytz-2009g-py2.5.egg + $ bin/pip zip pytz-2009g-py2.5.egg Note that it requires the whole egg file name. For a BFG app, the following packages are good candidates to be zipped. -- cgit v1.2.3