On 7/19/07, Greg <[EMAIL PROTECTED]> wrote:
>         x = request.session ?? # I want to add s and c to my session?

cart = request.session.get('cart', [])
cart.append({'style':s,'choice'c})

request.session['cart']=cart

But, fundamentally, putting cart info in session is a bad idea; people
switch computers (and thus cookies; sessions) fairly often.  Also,
people delete cookies for good reasons.  I'd be severely pissed if my
amazon wishlist went away when I deleted cookies.

> I'm also not sure how
> to display all the session data.

http://www.djangoproject.com/documentation/authentication/#authentication-data-in-templates
http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext
http://www.djangoproject.com/weblog/2005/sep/24/newshortcuts/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to