Hi Karen, THANK YOU! After much head-scratching and debugging late into the night, I indeed found that both sites were naming the sessionid cookie "sessionid", but I am glad that you have confirmed my suspicion! My temporary workaround was to always use "127.0.0.1" for site A, and "localhost" for site B (I had been using them interchangeably yesterday). However, I knew this would fall apart once I started working on site C.
I was going to look into whether or not it is possible to store cookies based on a site and port number combination, since site A runs on port 8000 and B is on 8081, but this is just a shot in the dark and it may not be possible. Instead, I'll go with renaming the sessionids per site. Thanks again!!! mmg On Jun 6, 11:38 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Sat, Jun 6, 2009 at 7:50 PM, metametagirl <metametag...@gmail.com> wrote: > > > Hi folks, > > I'm new to Django and web development in general (though I'm > > experienced with Python). I'm developing two sites on my local > > desktop machine. Each site is a separate Django site with one app, > > and each site has a separate sqlite3 database file. I'm experiencing > > the following odd behavior: > > > - User logs into site A (django.contrib.auth) > > - User logs into site B in another Firefox tab > > - User checks (refreshes) site A -- the user has been logged out > > - User checks site B -- the user has been logged out > > > I've noticed that if I access site A and site B from different web > > browsers, this issue doesn't occur (i.e. use Firefox for site A, > > Safari for site B). However, I'd still like to know what the problem > > is and how to fix it so that the user can access both sites in the > > same browser and get the expected behavior! > > Configure different session cookie names: > > http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-name > > for the different apps running on the same server. As it is it sounds like > the default value 'sessionid' is being used by both and the browser is > keeping just one value for its content, because app A and B are on the same > server. So when the value for B's sessionid cookie is presented by the > browser to app A, no matching session is found and a new login is requested, > setting a new sessionid cookie value (and thus making it impossible to > access app B without logging in there again). > > Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---