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