I want to add potential products to a session list and if an order is
placed iterate over that list and add them to an order.
Or are there better ways to do this?
Thanks.
Seth
The session object is a dictionary-look-alike. It's available through
request.session.
See <http://www.djangoproject.com/documentation/sessions/>
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair
request.session["order_items"] = []
and then in different view I can have:
request.session["order_items"].append(1)
and that append to the session variable?
yes, but the session itself doesn't know that you modified it, so you
will have to save it yourself, see
http://www.djangoproject.com/documentation/sessions/#when-sessions-are-saved
>
>
> >
>
--
Honza Král
E-Mail: Honza...@gmail.com
ICQ#: 107471613
Phone: +420 606 678585
Thanks.
Seth