Package fancyflash
[hide private]

Package fancyflash

source code

Functions for displaying status messages on the next page.

Intended as drop-in replacement and building on turbogears.flash() but allow for much nicer styling of the messages, since you can pass a "status" parameter, which will be used for the CSS class of the DIV element that encloses the status message.

Submodules [hide private]

Functions [hide private]
 
set_default_flash_timeout(timeout)
Set the default timeout after which the message box disappears.
source code
 
register_flash_widget(widget='fancyflash.fancyflashwidget')
Register FancyFlashWidget to be included on every page.
source code
 
statusmessage(msg, status='info', timeout=0, allow_html=False)
Display fancy flash window with message msg on the next page.
source code
 
error(msg, timeout=0, allow_html=False)
Display fancy flash window with message msg and status "error".
source code
 
info(msg, timeout=0, allow_html=False)
Display fancy flash window with message msg and status "info".
source code
 
success(msg, timeout=0, allow_html=False)
Display fancy flash window with message msg and status "success".
source code
 
warning(msg, timeout=0, allow_html=False)
Display fancy flash window with message msg and status "warning".
source code
Variables [hide private]
  fancyflashwidget = FancyFlashWidget(name='statusmessage', stat...
  _default_timeout = 0
Function Details [hide private]

statusmessage(msg, status='info', timeout=0, allow_html=False)

source code 

Display fancy flash window with message msg on the next page.

status - string, which will be used as the css class for the inner DIV element of the message window. The default CSS supports different styles and icons for status "info", "success", "warning" and "error".

timeout - number of seconds after which the message will fade out. The client needs to have JavaScript enabled for this to work. Default is 0, i.e. the message stays until the user clicks on it.

allow_html- normally, HTML markup in msg is escaped for security reasons. Set this to True to allow usage of HTML markup in the message text.

error(msg, timeout=0, allow_html=False)

source code 

Display fancy flash window with message msg and status "error".

For the timeout and alllow_html arguments, see the documentation for the statusmessage funcion.

info(msg, timeout=0, allow_html=False)

source code 

Display fancy flash window with message msg and status "info".

For the timeout and alllow_html arguments, see the documentation for the statusmessage funcion.

success(msg, timeout=0, allow_html=False)

source code 

Display fancy flash window with message msg and status "success".

For the timeout and alllow_html arguments, see the documentation for the statusmessage funcion.

warning(msg, timeout=0, allow_html=False)

source code 

Display fancy flash window with message msg and status "warning".

For the timeout and alllow_html arguments, see the documentation for the statusmessage funcion.


Variables Details [hide private]

fancyflashwidget

Value:
FancyFlashWidget(name='statusmessage', status='info', message='', time\
out=0)