First a suggestion..

     if form.accepts(request.vars,session):
         response.flash=T('done!')
         redirect(URL(r=request,f='select/%s/%s'%(dbname,table)))

should be

     if form.accepts(request.vars,session):
         session.flash=T('done!')
         redirect(URL(r=request,f='select',args=[dbname,table]))

do to what you ask you have various options depending on the workflow.
Most of the cases this works

         redirect(request.env.http_referer)

This will not work if the form has self submitted. In that case you
need to pass to the action the url explicitly or store it in a
session.variable. I cannot be more explicit without seeing the
complete action and calling action.

Massimo
On Dec 2, 6:55 pm, pmate <[EMAIL PROTECTED]> wrote:
> Hi all,
> my update function ends with:
>    ......
>     if form.accepts(request.vars,session):
>         response.flash=T('done!')
>         redirect(URL(r=request,f='select/%s/%s'%(dbname,table)))
>
> ok, so when a form is validated, an update is performed and there is
> the redirection to a prefixed page.
> But i can have access to update page from wherever i like, right? Is
> there a way, once that form is validated, to be redirected to the page
> that called the update?
> For example, from /default/myfunc/names/26  in my (linkto)list i
> choose one id and i go to update that record in /appadmin/update/db/
> example/idchosen. Once finished i would go back to /default/myfunc/
> names/26 and not to f='select/%s/%s'%(dbname,table).
> How can i do?
> thanks
>
> ...my english is so bad...
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to