Browse Source

Documented new signal message_flashed

pull/695/head
Armin Ronacher 12 years ago
parent
commit
4366bb392a
  1. 1
      CHANGES
  2. 8
      docs/api.rst
  3. 18
      docs/signals.rst

1
CHANGES

@ -51,6 +51,7 @@ Release date to be decided.
as intended with domain names.
- Changed logic for picking defaults for cookie values from sessions
to work better with Google Chrome.
- Added `message_flashed` signal that simplifies flashing testing.
Version 0.9
-----------

8
docs/api.rst

@ -524,6 +524,14 @@ Signals
An `exc` keyword argument is passed with the exception that caused the
teardown.
.. data:: message_flashed
This signal is sent when the application is flashing a message. The
messages is sent as `message` keyword argument and the category as
`category`.
.. versionadded:: 0.10
.. currentmodule:: None
.. class:: flask.signals.Namespace

18
docs/signals.rst

@ -291,4 +291,22 @@ The following signals exist in Flask:
This will also be passed an `exc` keyword argument that has a reference
to the exception that caused the teardown if there was one.
.. data:: flask.message_flashed
:noindex:
This signal is sent when the application is flashing a message. The
messages is sent as `message` keyword argument and the category as
`category`.
Example subscriber::
recorded = []
def record(sender, message, category, **extra):
recorded.append((message, category))
from flask import message_flashed
message_flashed.connect(record, app)
.. versionadded:: 0.10
.. _blinker: http://pypi.python.org/pypi/blinker

Loading…
Cancel
Save