URL(..., args=request.args, vars=request.get_vars) is the right way to
construct a URL that includes the args and query string variables from the
current request. However, I assume you don't actually have controllers
named en.py and it.py, so you shouldn't be passing the language codes as
the first argument to URL() (the first argument should be either the app,
controller, or function name).
Anthony
On Sunday, March 16, 2014 4:24:38 AM UTC-4, Gael Princivalle wrote:
> Hello all.
>
> How can I add to my URL helper all current args and vars ?
>
> I would like to do something like that for language switching :
> My current URL is:
> mydomain.com/en/concert?id=2
>
> With that:
> URL('it', f=request.function, args=request.args, vars=request.vars)
> I would like to go to:
> mydomain.com/it/concert?id=2
>
> But the result is:
> mydomain.com/it/concert
>
> Someone knows how I can do that ?
>
> Thanks, regards.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.