How does Juno handle user input from form?

1 view
Skip to first unread message

Zhang Huangbin

unread,
Mar 15, 2009, 10:18:52 PM3/15/09
to juno-framework
Hi, Brian.

How does Juno handle user input from form?

Thanks :)

Zhang Huangbin

unread,
Mar 15, 2009, 10:33:15 PM3/15/09
to juno-framework


Zhang Huangbin wrote:
> Hi, Brian.
>
> How does Juno handle user input from form?
>

Oops, i found it in docs/forms.txt :)

sorry for my noise.

Brian

unread,
Mar 15, 2009, 10:33:56 PM3/15/09
to juno-framework
See:

http://github.com/breily/juno/blob/master/doc/7-forms.txt
http://github.com/breily/juno/blob/master/doc/examples/forms.py

Basically the request object that each function gets as its first
argument (called 'web' in examples) has a method called input(). If
you do web.input(), you get back a dict of all form fields and query
string arguments. If you have a form field named 'x' you can do
web.input('x') to get just its value. If you have multiple form
fields named 'x' you'll get back a list of values.

This works the same with query strings.
Reply all
Reply to author
Forward
0 new messages