I'm not sure if it's reliable or safe but request.env.http_referer might be what you're looking for.
On May 3, 4:39 pm, Miguel Lopes <mig.e.lo...@gmail.com> wrote: > Is there a way to find the previous location / address in an action? > > For example: > Currently inwww.domain.com/a/c/f/arg1 > Follow some link to action_x > > def action_x: > if something_is_wrong: > redirect(request.last_location) # including args > ... > > My goal is to send the user to the page is comming from in case he calls an > action with a incorrect or the wrong parameters. > > Txs, > Miguel