you can also do

def done(form): session.flash=T("Done")
t2.create(db.table,next='index',onaccept=done)

Massimo

On Dec 31, 4:04 am, nemik <ne...@nemik.net> wrote:
> Hello,
>
> Maybe I'm doing this wrong, but I'm looking for an easy way to pass in
> a string to be displayed as "flash" once a form finishes for...let's
> say t2's create().
>
> It is written in the t2 module:
>    def create(self,table,next=None,vars={},onaccept=None):
>         """
>         t2.create(db.table,next='index',flash='done',vars=
> {},onaccept=None)
>         .....
>         """
>
> So in the comment, there is a flash='done' that can be changed, but in
> the actual implementation there is no flash and the session.flash for
> form.accepts(response.vars,session) is just the predefined
> record_created one.
>
> So in my controller, how can this be changed so instead of displaying
> the "Record created" in the flash div, I can have something custom for
> just just that controller?
>
> Can something be done in the controller or should t2.py module be
> updated?
>
> Thank you,
> Nemanja
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to