Cookies not be set for IE6, IE7 and Safari.
|Reported by:||sethtrain||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When using session variables the corresponding session cookies aren't being set in IE6, 7 and Safari when application is on production server. This doesn't happen when the application is ran from the Django development server. I have tried setting SESSION_COOKIE_DOMAIN and that didn't work and now I am butting my head to figure out what is going on. Firefox works on production server just fine.
I have running Ubuntu 7.10 with Apache 2.2 and mod_wsgi 1.3 if that helps any. I do not have PHP enabled. At this point I am willing to share any of my code to figure this out. The Admin doesn't work and I have a piece of code that gets or sets a session id for a cart if it exists. I do this when adding items to the cart or displaying the cart in any way. Adding and item to the cart works just fine but when trying to go to the cart page and displaying that same cart I get an empty cart. Here is my get cart method.
@classmethod def get_session_cart(cls, request, customer=None): try: cart = cls.objects.get(pk=request.session.get('cart', '')) except Cart.DoesNotExist: cart = cls() cart.customer = customer cart.save() request.session['cart'] = cart.id return cart
So the session cookies aren't being saved and Django creates a new session every time I run this method.