How to get ctx.env values

98 views
Skip to first unread message

Tomas Schertel

unread,
Sep 13, 2012, 4:51:47 PM9/13/12
to we...@googlegroups.com
My application receives a POST and his web.ctx.fullpath is this: /account/list/?jtStartIndex=0&jtPageSize=20&jtSorting=name%20ASC

I want to get just the value of jtSorting. I'm using web.ctx.env.get('jtSorting'), but I receive "None" as value.
I've looked at http://webpy.org/cookbook/ctx. but I'm doing something wrong and I can't figure it out.

Thanks.

Ben Corneau

unread,
Sep 17, 2012, 11:57:22 AM9/17/12
to we...@googlegroups.com
try web.input()  http://webpy.org/cookbook/input 


params = web.input(jtSorting="default")
sorting = params.jtSorting



--
You received this message because you are subscribed to the Google Groups "web.py" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webpy/-/5BE8z_wHYAAJ.
To post to this group, send email to we...@googlegroups.com.
To unsubscribe from this group, send email to webpy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webpy?hl=en.

Tomas Schertel

unread,
Sep 17, 2012, 2:28:17 PM9/17/12
to we...@googlegroups.com
Hi Ben,

Thanks for reply.
I did the trick using web.ctx.query.

Thanks again.
Reply all
Reply to author
Forward
0 new messages