summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/bfgwiki/authorization.rst5
-rw-r--r--docs/tutorials/bfgwiki/viewdecorators.rst5
-rw-r--r--docs/tutorials/bfgwiki2/authorization.rst5
-rw-r--r--docs/tutorials/gae/index.rst6
4 files changed, 15 insertions, 6 deletions
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.