Hi.. =)
In our project we have created a simple way to determine flash options,
using customized functions:
def __flash(message, status):
flash(dict(message=message, status=status))
def flash_info(message):
__flash(message, 'info')
def flash_warning(message):
__flash(message, 'warning')
def flash_error(message):
__flash(message, 'error')
And inside master template we are using:
<div py:if="tg_flash" py:with="f = eval(tg_flash)"
id="status_block" class="flash_${f['status']}"
py:content="f['message']"></div>
As you can see, we pass to tg_flash a dict containing the message and
status we want to show. So we can customize our messages with any status
we need and just create something like:
.flash_info {}
.flash_warning {}
.flash_error {}
in our css we can easily modify the status look.
Here we are using three kind of messages: info, warning and error, but
you can customize as you need.
It's is just a simple idea we've found to create different messages
without use any plugin. =)
---------------------------
Carlos Antonio da Silva
Sistemas de Informação
Rio do Sul - Santa Catarina
"Não deixa de fazer algo que gosta devido à falta de tempo,
a única falta que terá, será desse tempo que infelizmente não voltará mais."
Christopher Arndt escreveu:
> Marco Mariani schrieb:
>
>> Christopher Arndt wrote:
>>
>>
>>> http://chrisarndt.de/projects/fancyflashexample/
>>>
>>>
>> oops.
>>
>> The requested URL
>> /projects/fancyflashexample/FancyFlashExample-1.0-py25.egg was not found
>> on this server.
>>
>
> Oops indeed, there was a dot missing in the URL. Fixed now.
>
> Chris
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---