| | 1 | = WebFlash = |
| | 2 | |
| | 3 | WebFlash is a library to display "flash" messages in python web applications. These messages are usually used to provide feedback to the user (eg: you changes have been saved, your credit card number has been stolen, ...). One important characteristic they must provide is the ability to survive a redirect (ie: display the message in a page after being redirected from a form submission). |
| | 4 | |
| | 5 | * WebFlash is implemented using cookies so no state must be kept in the server. |
| | 6 | * The messages can be rendered by the browser using Javascript. This allows pages to be cached more easily. |
| | 7 | * The messages can alternatively be rendered by the server in the html response so JS can be disabled and still work |
| | 8 | * The JS code is small (~1Kb) and has no dependency on any library |
| | 9 | * The Python code is small and has no dependency outside of the standard library (if using Python 2.6, else [http://pypi.python.org/pypi/simplejson simplejson] is needed) |
| | 10 | * WebFlash is designed to be used in WSGI frameworks with a [http://pypi.python.org/pypi/WebOb WebOb]-like Reuqest/Response objects. (only a Response object with a {{{set_cookie(name, value)}}} method is needed if using JavaScript to display messages) |
| | 11 | |
| | 12 | This library has been inspired by this [http://blog.ianbicking.org/2008/12/17/javascript-status-message-display/ blog post] |
| | 13 | |
| | 14 | This library is used by the [http://www.turbogears.org/ TurboGears 2] framework and [http://python-rum.org Rum] |
| | 15 | |
| | 16 | This is the latest [http://hg.python-rum.org/WebFlash/archive/tip.tar.gz#egg=WebFlash-dev development snapshot] |