thank you Bruno.
I have one more question about query.( I think I was happened to see your
github code as well)
 I have a form in HTML
and I read all the form values by serializing it
code
var data = $('.info input[type=\'text\', ....)
alert(data) // it shows pid=8&topping=1&topping=3&... on and on
I have a problem on this  line
How can I send the serialized values by using ajax to the python method?
This is what I wrote
/////
ajax('{{=URL('tester',vars=dict(data=data))}}',,box-content');
////
I have def tester , and box-content is a class name of DIV
Also I tried
ajax('tester',['data'],'box-content');
no luck.

I hope I am going right direction. Thank you

On Mon, Mar 26, 2012 at 12:17 PM, Bruno Rocha <[email protected]> wrote:

> a list of dictionaries.
>
> session.order = []
>
> pizza = {"id": 1234, "quantity": 2, "toppings": ["tomatoes", "pepper",
> "zuchini"]}
>
> session.order.append(dict(pizza))
>
>
> On Mon, Mar 26, 2012 at 4:02 PM, Kenny <[email protected]> wrote:
>
>> I am just trying to make pizza order page with web2py.
>> I usually store quantity of pizza and id number in session.
>>
>> But how can I store pizza topping info that user ordered in session?
>>
>> I am not too familiar with python, so I don't know what would be the
>> best way to store it.
>>
>> So session will have
>>
>> {pizza_id, quantity}
>>
>> and toppings under that pizza id.
>>
>> Thank you.
>
>
>
>
> --
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

Reply via email to