On Oct 21, 2:53 pm, "Aaron Swartz" <[EMAIL PROTECTED]> wrote:
> > For example, how would you do it for a shopping cart?
>
> That's a good example. Personally, I'd have a cookie that listed the
> product IDs they'd added to the cart and if they went over the
> cookie-size limit I'd ask them to create an account.

Like luismgz asked, isn't that exactly what sessions do?

Once they go over the cookie size, they create an account.  Now you
have to store some information in your database (a username, a cart
pointing to that username, items pointing to that cart) - it doesn't
matter if they're in their own tables or serialized.  And then for the
user to say on each request that "I am user X" you set a cookie that
has some mapping to a user ID, right?  Which is exactly what a session
is, right?

I'm not trying to troll, I'm honestly curious here.  Am I missing
something?

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

Reply via email to