This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!
Project Description

This package provides an enhanced version of the turbogears.flash() function, giving your users much nicer-looking message boxes that can change their appearance based on the status of the message. With JavaScript enabled, messages can fade out after a timeout or be dismissed by the user with a mouse-click.

This is accomplished by encoding the message with JSON and decoding it again in the template of the target page. This is handled completely automatic and the programmer can just use the functional interface, e.g. fancyflash.error("Duh!").

Additionally, you can display messages with a simple JavaScript function call, for example when processing the results of an AJAX call in your callback function for loadJSONDoc.

For more information see the source of the fancyflash package, the epydoc-generated API documentation and the FancyFlashExample application.


To install TurboFancyFlash from the Cheeseshop use easy_install:

[sudo] easy_install TurboFancyFlash

This requires the setuptools package to be installed. If you have not done so already, download the script and run it to install setuptools.


Controller (

# Import TurboGears
from turbogears import controllers, expose, redirect, validate, validators

# Import fancyflash package
import fancyflash as ff

# Set the default timeout for message box display

# Let FancyFlashWidget be included on every page

class FlashTestController(controllers.Controller):

    def index(self, timeout=0):
        return {}

    def info(self):"Hello TurboGears!")

    def success(self, timeout=0, tg_errors=None):
        ff.success("Hello TurboGears!", timeout)

    def message(self, status="info", tg_errors=None):
        ff.statusmessage("Hello TurboGears!", status)

Master template (master.kid):

<div id="main_content">
  <div py:replace="tg_fancyflashwidget(tg_flash)">Status message
    appears here</div>

  <div py:replace="[item.text]+item[:]"/>



The idea for this widget is based on a blog post by Lee McFadden:


  • Test in IE
  • Test opacity in Safari

If I have time:

  • Add argument for dialog position (implement by writing CSS dynamically).
  • Round boxes for non-Gecko browsers
  • Add AJAX widget, which displays result of loadJSONDoc as fancy status message.
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
TurboFancyFlash-0.1a-py2.5.egg (94.0 kB) Copy SHA256 Checksum SHA256 2.5 Egg Feb 4, 2008
TurboFancyFlash-0.1a.tar.bz2 (107.9 kB) Copy SHA256 Checksum SHA256 Source Feb 4, 2008 (164.2 kB) Copy SHA256 Checksum SHA256 Source Feb 4, 2008

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting