On Feb 5, 2:43 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> @expose()
> @state(SomeState)
> def doedit(self, state, stuff):
>     "save stuff"
>     raise redirect(state.url("/some/resource/page/"))
>
> and state.url() takes care of appending the variables to the URL.

You can still save that state in the session:
session['somestate'] = {page: 23, query: 'foo bar'}

And use tg.url to generate the URL:
raise redirect(url("/some/resource/", **session['somestate']))
=> /some/resource/?page=23&query=foo%20bar

Still quite easy and concise. An abstraction layer would be overkill
imho.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to