summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/install.rst2
-rw-r--r--docs/narr/muchadoabouttraversal.rst18
-rw-r--r--docs/narr/sessions.rst43
3 files changed, 24 insertions, 39 deletions
diff --git a/docs/narr/install.rst b/docs/narr/install.rst
index 7f4742ee2..8fc63f3a4 100644
--- a/docs/narr/install.rst
+++ b/docs/narr/install.rst
@@ -341,7 +341,7 @@ for both versions are included below.
Windows Using Python 2
~~~~~~~~~~~~~~~~~~~~~~
-#. Install, or find the most recent `Python 2.7.x version
+#. Install the most recent `Python 2.7.x version
<http://www.python.org/download/>`_ for your system.
#. Install the `Python for Windows extensions
diff --git a/docs/narr/muchadoabouttraversal.rst b/docs/narr/muchadoabouttraversal.rst
index 40d498391..483b1bb16 100644
--- a/docs/narr/muchadoabouttraversal.rst
+++ b/docs/narr/muchadoabouttraversal.rst
@@ -168,18 +168,12 @@ hood, when ``adict`` is a dictionary-like object, Python translates
``adict['a']`` to ``adict.__getitem__('a')``. Try doing this in a Python
interpreter prompt if you don't believe us:
-.. code-block:: text
- :linenos:
-
- Python 2.4.6 (#2, Apr 29 2010, 00:31:48)
- [GCC 4.4.3] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> adict = {}
- >>> adict['a'] = 1
- >>> adict['a']
- 1
- >>> adict.__getitem__('a')
- 1
+>>> adict = {}
+>>> adict['a'] = 1
+>>> adict['a']
+1
+>>> adict.__getitem__('a')
+1
The dictionary-like root object stores the ids of all of its subresources as
diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst
index fa4affd8a..c4f4b5f07 100644
--- a/docs/narr/sessions.rst
+++ b/docs/narr/sessions.rst
@@ -252,25 +252,19 @@ that were added to the flash queue, and empties the queue.
.. method:: pop_flash(queue='')
-.. code-block:: python
- :linenos:
-
- >>> request.session.flash('info message')
- >>> request.session.pop_flash()
- ['info message']
+>>> request.session.flash('info message')
+>>> request.session.pop_flash()
+['info message']
Calling ``session.pop_flash()`` again like above without a corresponding call
to ``session.flash()`` will return an empty list, because the queue has already
been popped.
-.. code-block:: python
- :linenos:
-
- >>> request.session.flash('info message')
- >>> request.session.pop_flash()
- ['info message']
- >>> request.session.pop_flash()
- []
+>>> request.session.flash('info message')
+>>> request.session.pop_flash()
+['info message']
+>>> request.session.pop_flash()
+[]
.. index::
single: session.peek_flash
@@ -285,18 +279,15 @@ popped from flash storage.
.. method:: peek_flash(queue='')
-.. code-block:: python
- :linenos:
-
- >>> request.session.flash('info message')
- >>> request.session.peek_flash()
- ['info message']
- >>> request.session.peek_flash()
- ['info message']
- >>> request.session.pop_flash()
- ['info message']
- >>> request.session.peek_flash()
- []
+>>> request.session.flash('info message')
+>>> request.session.peek_flash()
+['info message']
+>>> request.session.peek_flash()
+['info message']
+>>> request.session.pop_flash()
+['info message']
+>>> request.session.peek_flash()
+[]
.. index::
single: preventing cross-site request forgery attacks