diff options
| author | Chris McDonough <chrism@plope.com> | 2010-12-28 18:26:14 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-12-28 18:26:14 -0500 |
| commit | de487c1729a41d236b107b3ad728edd7df71ec1e (patch) | |
| tree | b0575885a46631b3bab83c1d3b90cf1fe17ecb63 /docs/narr/flash.rst | |
| parent | afbc5d57ddd848b7f2e8c8190afc2109c7563496 (diff) | |
| parent | 1e209fc65d62a86d15bf54fa2a91a6728d0ade9e (diff) | |
| download | pyramid-de487c1729a41d236b107b3ad728edd7df71ec1e.tar.gz pyramid-de487c1729a41d236b107b3ad728edd7df71ec1e.tar.bz2 pyramid-de487c1729a41d236b107b3ad728edd7df71ec1e.zip | |
Merge branch 'mgedmin-master'
Diffstat (limited to 'docs/narr/flash.rst')
| -rw-r--r-- | docs/narr/flash.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/narr/flash.rst b/docs/narr/flash.rst index d41c2cdaf..71c6cf305 100644 --- a/docs/narr/flash.rst +++ b/docs/narr/flash.rst @@ -38,7 +38,7 @@ provide is not modified in any way. The ``queue`` argument allows you to choose a queue to which to append the message you provide. This can be used to push different kinds of messages -into flash storage for later display in different places on a page. You cam +into flash storage for later display in different places on a page. You can pass any name for your queue, but it must be a string. The default value is the empty string, which chooses the default queue. Each queue is independent, and can be popped by ``pop_flash`` or examined via ``peek_flash`` separately. @@ -49,20 +49,22 @@ default flash message queue. request.session.flash(msg, 'myappsqueue') -The ``allow_duplicate`` argument, which defaults to ``True``. If this is +The ``allow_duplicate`` argument defaults to ``True``. If this is ``False``, if you attempt to add a message to a queue which is already present in the queue, it will not be added. Using the ``session.pop_flash`` Method -------------------------------------- -Once one or more messages has been added to a flash queue by the +Once one or more messages have been added to a flash queue by the ``session.flash`` API, the ``session.pop_flash`` API can be used to pop that queue and return it for use. To pop a particular queue of messages from the flash object, use the session object's ``pop_flash`` method. +.. method:: pop_flash(queue='') + .. code-block:: python :linenos: @@ -93,6 +95,8 @@ Once one or more messages has been added to a flash queue by the at that queue. Unlike ``session.pop_flash``, the queue is not popped from flash storage. +.. method:: peek_flash(queue='') + .. code-block:: python :linenos: |
