On Sat, Jun 6, 2009 at 7:50 PM, metametagirl <[email protected]> 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 [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