I'm a Django beginner.
My site - let's call it abc.com - works fine, letting users log in and out (having originally registered via Django registratiaon). If it's relevant, my virtuahosts file has ServerName abc.com and ServerAlias www.abc.com directives.
I don't want my visitors to sense that both abc.com and www.abc.com exist, and so discovered Django's prepen开发者_运维技巧d_www setting, which works as intended. In addition to working as intended, however, there's a side effect that disables logging in and out when visiting the www. variant of my site.
In your settings.py try setting:
SESSION_COOKIE_DOMAIN = ".abc.com"
This will make the cookie apply to all the subdomains of abc.com.
精彩评论