Hello everybody! I am working with sessions with the database backend in an e-commerce shop. I store the cart ID, the number of items in the cart and the total prize in the session. But actually have two problems.
1. I set the SESSION_EXPIRE_AT_BROWSER_CLOSE = True, but Django does not delete the session from the relation django_session when the browser is closed. Why is that? Is that normal? 2. How can I erase the shopping cart whose ID is in the session, when the session ends at browser close? I guess I should execute some code similar to the following, but I do not know where exactly: cart = Cart.objects.get(request.session[cart_id]) # This code is assuming that this is in a view cart.delete() Thank you so much. Replies will be wellcome. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.